Move the version fetching to a more accessible location
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
from django.conf import settings
|
||||
import subprocess
|
||||
def version():
|
||||
proc = subprocess.Popen(["git", "--git-dir", settings.APPVERSION_GIT_REPO, "describe"], stdout=subprocess.PIPE)
|
||||
proc.wait()
|
||||
version = proc.stdout.read().strip()
|
||||
return version
|
||||
|
@@ -1,8 +1,4 @@
|
||||
import subprocess
|
||||
from django.conf import settings
|
||||
from appversion import version
|
||||
|
||||
def git_version(request):
|
||||
proc = subprocess.Popen(["git", "--git-dir", settings.APPVERSION_GIT_REPO, "describe"], stdout=subprocess.PIPE)
|
||||
proc.wait()
|
||||
version = proc.stdout.read().strip()
|
||||
return {"app_version": version}
|
||||
return {"app_version": version()}
|
||||
|
Reference in New Issue
Block a user