just use simple version instead of git hash
This commit is contained in:
parent
050cd9c861
commit
2440c1c1bf
1 changed files with 1 additions and 10 deletions
11
setup.py
11
setup.py
|
@ -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.",
|
||||||
|
|
Loading…
Reference in a new issue