mirror of
https://github.com/Z3Prover/z3
synced 2025-08-25 12:35:59 +00:00
Move VERSION.txt to scripts/ and update all references
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
parent
69c0c01b1a
commit
8280102464
8 changed files with 10 additions and 8 deletions
|
@ -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)
|
||||
|
|
|
@ -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"],
|
||||
)
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue