diff --git a/CMakeLists.txt b/CMakeLists.txt index d1cfa8ee3..603e86ee1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.16) set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cxx_compiler_flags_overrides.cmake") # Read version from VERSION.txt file -file(READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION.txt" Z3_VERSION_FROM_FILE) +file(READ "${CMAKE_CURRENT_SOURCE_DIR}/scripts/VERSION.txt" Z3_VERSION_FROM_FILE) string(STRIP "${Z3_VERSION_FROM_FILE}" Z3_VERSION_FROM_FILE) project(Z3 VERSION ${Z3_VERSION_FROM_FILE} LANGUAGES CXX) diff --git a/MODULE.bazel b/MODULE.bazel index c368221da..48848d27e 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -1,6 +1,6 @@ module( name = "z3", - version = "4.16.0", # TODO: Read from VERSION.txt - currently manual sync required + version = "4.15.4", # TODO: Read from VERSION.txt - currently manual sync required bazel_compatibility = [">=7.0.0"], ) diff --git a/VERSION.txt b/scripts/VERSION.txt similarity index 100% rename from VERSION.txt rename to scripts/VERSION.txt diff --git a/scripts/mk_project.py b/scripts/mk_project.py index da73e2daf..7b4d444ea 100644 --- a/scripts/mk_project.py +++ b/scripts/mk_project.py @@ -9,7 +9,7 @@ from mk_util import * def init_version(): # Read version from VERSION.txt file - version_file_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'VERSION.txt') + version_file_path = os.path.join(os.path.dirname(__file__), 'VERSION.txt') try: with open(version_file_path, 'r') as f: version_str = f.read().strip() diff --git a/scripts/nightly.yaml b/scripts/nightly.yaml index 63c259397..d051cb0ee 100644 --- a/scripts/nightly.yaml +++ b/scripts/nightly.yaml @@ -1,8 +1,8 @@ variables: # Version components read from VERSION.txt (updated manually when VERSION.txt changes) Major: '4' - Minor: '16' - Patch: '0' + Minor: '15' + Patch: '4' ReleaseVersion: $(Major).$(Minor).$(Patch) AssemblyVersion: $(Major).$(Minor).$(Patch).$(Build.BuildId) NightlyVersion: $(AssemblyVersion)-$(Build.buildId) diff --git a/scripts/release.yml b/scripts/release.yml index 5973c46f5..b26539c35 100644 --- a/scripts/release.yml +++ b/scripts/release.yml @@ -6,7 +6,7 @@ trigger: none variables: - ReleaseVersion: '4.16.0' # TODO: Auto-read from VERSION.txt when Azure DevOps supports it better + ReleaseVersion: '4.15.4' # TODO: Auto-read from VERSION.txt when Azure DevOps supports it better stages: diff --git a/scripts/update_version.py b/scripts/update_version.py index fcc3c5576..f33b20655 100755 --- a/scripts/update_version.py +++ b/scripts/update_version.py @@ -16,7 +16,7 @@ import sys def read_version(): """Read version from VERSION.txt file.""" script_dir = os.path.dirname(os.path.abspath(__file__)) - version_file = os.path.join(os.path.dirname(script_dir), 'VERSION.txt') + version_file = os.path.join(script_dir, 'VERSION.txt') try: with open(version_file, 'r') as f: diff --git a/src/api/python/setup.py b/src/api/python/setup.py index bdc3cc38b..75b2298ac 100644 --- a/src/api/python/setup.py +++ b/src/api/python/setup.py @@ -120,6 +120,8 @@ def _z3_version(): if os.path.exists(d): print(d, ": ", os.listdir(d)) fns = [os.path.join(d, 'VERSION.txt') for d in dirs] + # Also try the scripts directory + fns.extend([os.path.join(d, 'scripts', 'VERSION.txt') for d in dirs]) for fn in fns: print("loading version file", fn, "exists", os.path.exists(fn)) if os.path.exists(fn): @@ -254,7 +256,7 @@ def _copy_sources(): # shutil.copy(os.path.join(SRC_DIR_REPO, 'LICENSE.txt'), ROOT_DIR) shutil.copy(os.path.join(SRC_DIR_REPO, 'LICENSE.txt'), SRC_DIR_LOCAL) - shutil.copy(os.path.join(SRC_DIR, 'VERSION.txt'), SRC_DIR_LOCAL) + shutil.copy(os.path.join(SRC_DIR, 'scripts', 'VERSION.txt'), SRC_DIR_LOCAL) shutil.copy(os.path.join(SRC_DIR_REPO, 'z3.pc.cmake.in'), SRC_DIR_LOCAL) shutil.copy(os.path.join(SRC_DIR_REPO, 'CMakeLists.txt'), SRC_DIR_LOCAL) shutil.copytree(os.path.join(SRC_DIR_REPO, 'cmake'), os.path.join(SRC_DIR_LOCAL, 'cmake'))