1
0
Fork 0

just use simple version instead of git hash

This commit is contained in:
Nick Sweeting 2019-05-02 15:30:42 -04:00
parent 050cd9c861
commit 2440c1c1bf

View file

@ -8,19 +8,10 @@ with open("README.md", "r") as fh:
script_dir = os.path.abspath(os.path.dirname(os.path.abspath(__file__))) script_dir = os.path.abspath(os.path.dirname(os.path.abspath(__file__)))
VERSION = open(os.path.join(script_dir, 'archivebox', 'VERSION'), 'r').read().strip() VERSION = open(os.path.join(script_dir, 'archivebox', 'VERSION'), 'r').read().strip()
try:
GIT_HEAD = open(os.path.join(script_dir, '.git', 'HEAD'), 'r').read().strip().split(': ')[1]
GIT_SHA = open(os.path.join(script_dir, '.git', GIT_HEAD), 'r').read().strip()[:9]
PYPI_VERSION = "{}+{}".format(VERSION, GIT_SHA)
except:
PYPI_VERSION = VERSION
with open(os.path.join(script_dir, 'archivebox', 'VERSION'), 'w+') as f:
f.write(PYPI_VERSION)
setuptools.setup( setuptools.setup(
name="archivebox", name="archivebox",
version=PYPI_VERSION, version=VERSION,
author="Nick Sweeting", author="Nick Sweeting",
author_email="git@nicksweeting.com", author_email="git@nicksweeting.com",
description="The self-hosted internet archive.", description="The self-hosted internet archive.",