Skip to content

Instantly share code, notes, and snippets.


esseti/ Secret

Created Jun 27, 2018
What would you like to do?
#this goes in
'dsn': env("SENTRY"),
//taken from .env file, use django-environ
'release': env('RELEASE'),
'env': SERVER
#function to update the .env file, goes in
def update_version(version, file=''):
#update the RELASE line with the new version
with open('configs/' + file, 'r+') as f:
lines = f.readlines()
for line in lines:
if line.startswith('RELEASE'):
line = "RELEASE=%s" % version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment