Move the version fetching to a more accessible location

This commit is contained in:
Trever Fischer
2012-10-21 20:08:35 -04:00
parent b1fd9c5f00
commit 10e930668f
2 changed files with 9 additions and 6 deletions

View File

@@ -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

View File

@@ -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()}