mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-23 19:19:31 +01:00
core: Better VERSION handling (closes #279)
This commit is contained in:
parent
88281a3a54
commit
0c8397e940
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,7 +3,7 @@
|
||||
!example-*.yml
|
||||
!.*.yml
|
||||
|
||||
# Ignore automatically generated version for normal commits. This is bumped manually when needed.
|
||||
# Automatically generated by setup.py
|
||||
__init__.py
|
||||
|
||||
env/
|
||||
|
@ -1 +0,0 @@
|
||||
__version__ = '0.9-beta1'
|
3
setup.py
3
setup.py
@ -10,8 +10,9 @@ try:
|
||||
version = subprocess.check_output(['git', 'describe', '--tags']).decode('utf-8').strip()
|
||||
except Exception as e:
|
||||
print('ERROR: Failed to get version from "git describe --tags": %s: %s' % (type(e).__name__, e))
|
||||
from __init__ import __version__ as fallback_version
|
||||
|
||||
with open('VERSION') as f:
|
||||
fallback_version = f.read().strip()
|
||||
print('Using fallback version of %r.' % fallback_version)
|
||||
version = fallback_version
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user