diff --git a/djtriggers/__init__.py b/djtriggers/__init__.py index 3c510fb..cd7ca49 100644 --- a/djtriggers/__init__.py +++ b/djtriggers/__init__.py @@ -1,21 +1 @@ -import os, subprocess, datetime - -def get_git_version(): - git_dir = os.path.abspath( - os.path.join( - os.path.abspath(os.path.dirname(__file__)), - '..', - '.git' - ) - ) - try: - # Python 2.7 has subprocess.check_output - # 2.6 needs this longer version - git_info = subprocess.Popen(['git', '--git-dir=%s' % git_dir, 'log', '--pretty=%ct %h', '-1'], stdout=subprocess.PIPE).communicate()[0].split() - git_time = datetime.datetime.fromtimestamp(float(git_info[0])) - except Exception: - git_time = datetime.datetime.now() - git_info = ('', '0000000') - return git_time.strftime('%Y.%m.%d') + '.' + git_info[1] - -__version__ = get_git_version() +__version__ = '1.0.1'