mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-25 00:08:11 +00:00
Make version PEP 440 compliant
This commit is contained in:
parent
f3b8f43689
commit
9cf2e4f5a6
@ -23,7 +23,7 @@
|
|||||||
# or negative for a release candidate or beta (after the base version
|
# or negative for a release candidate or beta (after the base version
|
||||||
# number has been incremented)
|
# number has been incremented)
|
||||||
|
|
||||||
__version__ = "2.2.35dev1"
|
__version__ = "2.2.35.dev2"
|
||||||
__version_info__ = (2, 2, 35, 99)
|
__version_info__ = (2, 2, 35, 99)
|
||||||
|
|
||||||
if "dev" in __version__:
|
if "dev" in __version__:
|
||||||
@ -31,7 +31,7 @@ if "dev" in __version__:
|
|||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
if os.path.exists(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", ".git")):
|
if os.path.exists(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", ".git")):
|
||||||
r = subprocess.check_output(["git", "rev-parse", "--short", "HEAD"]).decode().strip()
|
r = subprocess.check_output(["git", "rev-parse", "--short", "HEAD"]).decode().strip("\n")
|
||||||
__version__ = "{}-{}".format(__version__, r)
|
__version__ += "+" + r
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
|
Loading…
Reference in New Issue
Block a user