From 2891c70065b3ec6157026c0b4123ae9c4cd7ade4 Mon Sep 17 00:00:00 2001 From: jofleish Date: Mon, 22 Aug 2022 16:32:21 -0400 Subject: [PATCH] Add print statements for version --- scripts/mk_util.py | 18 +++++++++++++----- scripts/mk_win_dist.py | 1 + 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/scripts/mk_util.py b/scripts/mk_util.py index ac08796c9..bd9186d0c 100644 --- a/scripts/mk_util.py +++ b/scripts/mk_util.py @@ -552,6 +552,7 @@ def set_version(major, minor, build, revision): VER_MINOR = versionSplits[1] VER_BUILD = versionSplits[2] VER_TWEAK = versionSplits[3] + print("Set Assembly Version (BUILD):", VER_MAJOR, VER_MINOR, VER_BUILD, VER_TWEAK) return # use parameters to set up version if not provided by script args @@ -565,6 +566,8 @@ def set_version(major, minor, build, revision): branch = check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD']) VER_TWEAK = int(check_output(['git', 'rev-list', '--count', 'HEAD'])) + print("Set Assembly Version (DEFAULT):", VER_MAJOR, VER_MINOR, VER_BUILD, VER_TWEAK) + def get_version(): return (VER_MAJOR, VER_MINOR, VER_BUILD, VER_TWEAK) @@ -1715,7 +1718,9 @@ class DotNetDLLComponent(Component): version = get_version_string(4) - core_csproj_str = """ + print(f"Version output to csproj: {version}"); + + core_csproj_str = f""" netstandard1.4 @@ -1727,7 +1732,7 @@ class DotNetDLLComponent(Component): Microsoft.Z3 true 1.0.4 - %s + {version} true Microsoft Microsoft @@ -1735,14 +1740,14 @@ class DotNetDLLComponent(Component): Z3 is a satisfiability modulo theories solver from Microsoft Research. Copyright Microsoft Corporation. All rights reserved. smt constraint solver theorem prover - %s + {key} - + -""" % (version, key, self.to_src_dir) +""" mk_dir(os.path.join(BUILD_DIR, 'dotnet')) csproj = os.path.join('dotnet', 'z3.csproj') @@ -2845,6 +2850,9 @@ def update_version(): minor = VER_MINOR build = VER_BUILD revision = VER_TWEAK + + print(f"UpdateVersion: {major}.{minor}.{build}.{revision}"); + if major is None or minor is None or build is None or revision is None: raise MKException("set_version(major, minor, build, revision) must be used before invoking update_version()") if not ONLY_MAKEFILES: diff --git a/scripts/mk_win_dist.py b/scripts/mk_win_dist.py index dd51b4b13..845f0dc92 100644 --- a/scripts/mk_win_dist.py +++ b/scripts/mk_win_dist.py @@ -203,6 +203,7 @@ def mk_z3s(): def get_z3_name(x64): major, minor, build, revision = get_version() + print("Assembly version:", major, minor, build, revision) if x64: platform = "x64" else: