Skip to content

Commit

Permalink
Use git commit id instead of bogus svn number
Browse files Browse the repository at this point in the history
  • Loading branch information
gnachman committed Jun 24, 2013
1 parent 88937a9 commit bef937a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions updateVersion.py
Expand Up @@ -12,17 +12,17 @@
from Foundation import NSMutableDictionary

if os.environ["CONFIGURATION"] == "Development":
status, output = commands.getstatusoutput("bash -l -c 'LANGUAGE=C svn info'")
cmd = "git log -1 --format=\"%H\""
status, output = commands.getstatusoutput(cmd)
if status != 0:
sys.exit(status)

revision = "git.unknown"
for line in output.split("\n"):
if len(line.strip()) == 0 or ":" not in line:
continue
key, value = [x.lower().strip() for x in line.split(":", 1)]
if key == "revision":
revision = "svn" + value
break
if len(line.strip()) > 0:
revision = "git." + line.strip()[:10]
break

elif os.environ["CONFIGURATION"] == "Nightly":
revision = time.strftime("%Y%m%d-nightly")
else:
Expand Down

0 comments on commit bef937a

Please sign in to comment.