Skip to content

Commit

Permalink
Merge branch. Use git for VERSION in __init__.py (closes #221)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jens Timmerman committed Mar 12, 2012
2 parents da1af02 + 3c79ac0 commit d5f033d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions framework/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import os, re
from distutils.version import LooseVersion


def get_git_revision():
try:
import git
path = os.path.dirname(__file__)
g = git.Git(path)
return g.rev_list("HEAD").splitlines()[0]
except:
return VERSION


VERSION = LooseVersion("1.0")
VERBOSE_VERSION = LooseVersion("%s-r%s" % (VERSION, get_git_revision()))

0 comments on commit d5f033d

Please sign in to comment.