Provide a separate version for PyPI inside version.sh

This commit is contained in:
Matthias Koefferlein 2019-11-12 00:04:40 +01:00
parent 3bf45f3638
commit f13bb771cd
2 changed files with 5 additions and 2 deletions

View File

@ -333,10 +333,10 @@ class Config(object):
version_file = os.path.join(os.path.dirname(__file__), "version.sh")
with open(version_file, "r") as file:
version_txt = file.read()
rm = re.search(r"KLAYOUT_VERSION\s*=\s*\"(.*?)\".*", version_txt)
rm = re.search(r"KLAYOUT_PYPI_VERSION\s*=\s*\"(.*?)\".*", version_txt)
if rm:
version_string = rm.group(1)
print("KLAYOUT_VERSION = " + version_string)
print("KLAYOUT_PYPI_VERSION = " + version_string)
return version_string
raise RuntimeError("Unable to obtain version string from version.sh")

View File

@ -4,6 +4,9 @@
# The main version
KLAYOUT_VERSION="0.26.1"
# The version used for PyPI (don't use variables here!)
KLAYOUT_VERSION="0.26.1r1"
# The build date
KLAYOUT_VERSION_DATE=$(date "+%Y-%m-%d")