mirror of
https://github.com/Z3Prover/z3
synced 2025-08-23 03:27:52 +00:00
read version from VERSION.txt
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
265265a68c
commit
72655637de
1 changed files with 2 additions and 2 deletions
|
@ -114,11 +114,11 @@ def _clean_native_build():
|
||||||
def _z3_version():
|
def _z3_version():
|
||||||
post = os.getenv('Z3_VERSION_SUFFIX', '')
|
post = os.getenv('Z3_VERSION_SUFFIX', '')
|
||||||
if RELEASE_DIR is None:
|
if RELEASE_DIR is None:
|
||||||
fn = os.path.join(SRC_DIR, 'scripts', 'mk_project.py')
|
fn = os.path.join(ROOT_DIR, 'VERSION.txt')
|
||||||
if os.path.exists(fn):
|
if os.path.exists(fn):
|
||||||
with open(fn) as f:
|
with open(fn) as f:
|
||||||
for line in f:
|
for line in f:
|
||||||
n = re.match(r".*set_version\((.*), (.*), (.*), (.*)\).*", line)
|
n = re.match(r"(.*), (.*), (.*), (.*)", line)
|
||||||
if not n is None:
|
if not n is None:
|
||||||
return n.group(1) + '.' + n.group(2) + '.' + n.group(3) + '.' + n.group(4) + post
|
return n.group(1) + '.' + n.group(2) + '.' + n.group(3) + '.' + n.group(4) + post
|
||||||
return "?.?.?.?"
|
return "?.?.?.?"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue