# Source control - managing Dev vs Production

**URL:** <https://forum.inductiveautomation.com/t/source-control-managing-dev-vs-production/42111>\
**Category:** Ignition\
**Created:** [January 11, 2021, 1:32pm UTC](https://forum.inductiveautomation.com/t/source-control-managing-dev-vs-production/42111 "2021-01-11T13:32:30Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [January 11, 2021, 1:48pm UTC](https://forum.inductiveautomation.com/t/source-control-managing-dev-vs-production/42111/2 "2021-01-11T13:48:24Z")

</div>

I had a similar question a while back about making sure some scripts only run on production.

> [@Good way to make sure my gateway scripts only run on the server?](http://forum.inductiveautomation.com/t/good-way-to-make-sure-my-gateway-scripts-only-run-on-the-server/33777):
>
> More of a design question than anything. I have gateway scripts, some of which involve emailing our companies clients. On occasion, I’ve had coworkers unknowingly backup the gateway to a development machine with an old database copy, and then all of a sudden our clients are getting emails with outdated information that they already received. Not great. Currently I’ve been telling people to not export/import gateway scripts, but there are other scripts that don’t involve emails that are essen…

Yes, the gateway scripts I make have to meet some environment criteria as part of the first if condition to run. Basically the gist is you have a config.json file, or add environment variables, to both machines and read from that to see where you are running. Read through the thread to see how to do this.

I cannot help you with that second question unfortunately.

---

_[View the full topic](https://forum.inductiveautomation.com/t/source-control-managing-dev-vs-production/42111)._
