Allow interface to specify alternate git repo path

This commit is contained in:
Trever Fischer
2012-02-25 12:40:21 -05:00
parent e620377f16
commit 52429225aa

View File

@@ -1,7 +1,8 @@
import subprocess
from django.conf import settings
def git_version(request):
proc = subprocess.Popen(["git", "describe"], stdout=subprocess.PIPE)
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}