3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-07-25 05:37:00 +00:00

Add print statements for version

This commit is contained in:
jofleish 2022-08-22 16:32:21 -04:00
parent 07def0ca07
commit 2891c70065
2 changed files with 14 additions and 5 deletions

View file

@ -552,6 +552,7 @@ def set_version(major, minor, build, revision):
VER_MINOR = versionSplits[1] VER_MINOR = versionSplits[1]
VER_BUILD = versionSplits[2] VER_BUILD = versionSplits[2]
VER_TWEAK = versionSplits[3] VER_TWEAK = versionSplits[3]
print("Set Assembly Version (BUILD):", VER_MAJOR, VER_MINOR, VER_BUILD, VER_TWEAK)
return return
# use parameters to set up version if not provided by script args # 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']) branch = check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD'])
VER_TWEAK = int(check_output(['git', 'rev-list', '--count', '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(): def get_version():
return (VER_MAJOR, VER_MINOR, VER_BUILD, VER_TWEAK) return (VER_MAJOR, VER_MINOR, VER_BUILD, VER_TWEAK)
@ -1715,7 +1718,9 @@ class DotNetDLLComponent(Component):
version = get_version_string(4) version = get_version_string(4)
core_csproj_str = """<Project Sdk="Microsoft.NET.Sdk"> print(f"Version output to csproj: {version}");
core_csproj_str = f"""<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard1.4</TargetFramework> <TargetFramework>netstandard1.4</TargetFramework>
@ -1727,7 +1732,7 @@ class DotNetDLLComponent(Component):
<PackageId>Microsoft.Z3</PackageId> <PackageId>Microsoft.Z3</PackageId>
<GenerateDocumentationFile>true</GenerateDocumentationFile> <GenerateDocumentationFile>true</GenerateDocumentationFile>
<RuntimeFrameworkVersion>1.0.4</RuntimeFrameworkVersion> <RuntimeFrameworkVersion>1.0.4</RuntimeFrameworkVersion>
<Version>%s</Version> <Version>{version}</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>Microsoft</Authors> <Authors>Microsoft</Authors>
<Company>Microsoft</Company> <Company>Microsoft</Company>
@ -1735,14 +1740,14 @@ class DotNetDLLComponent(Component):
<Description>Z3 is a satisfiability modulo theories solver from Microsoft Research.</Description> <Description>Z3 is a satisfiability modulo theories solver from Microsoft Research.</Description>
<Copyright>Copyright Microsoft Corporation. All rights reserved.</Copyright> <Copyright>Copyright Microsoft Corporation. All rights reserved.</Copyright>
<PackageTags>smt constraint solver theorem prover</PackageTags> <PackageTags>smt constraint solver theorem prover</PackageTags>
%s {key}
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Include="..\%s\*.cs;*.cs" Exclude="bin\**;obj\**;**\*.xproj;packages\**" /> <Compile Include="..\{self.to_src_dir}\*.cs;*.cs" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
</ItemGroup> </ItemGroup>
</Project>""" % (version, key, self.to_src_dir) </Project>"""
mk_dir(os.path.join(BUILD_DIR, 'dotnet')) mk_dir(os.path.join(BUILD_DIR, 'dotnet'))
csproj = os.path.join('dotnet', 'z3.csproj') csproj = os.path.join('dotnet', 'z3.csproj')
@ -2845,6 +2850,9 @@ def update_version():
minor = VER_MINOR minor = VER_MINOR
build = VER_BUILD build = VER_BUILD
revision = VER_TWEAK 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: 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()") raise MKException("set_version(major, minor, build, revision) must be used before invoking update_version()")
if not ONLY_MAKEFILES: if not ONLY_MAKEFILES:

View file

@ -203,6 +203,7 @@ def mk_z3s():
def get_z3_name(x64): def get_z3_name(x64):
major, minor, build, revision = get_version() major, minor, build, revision = get_version()
print("Assembly version:", major, minor, build, revision)
if x64: if x64:
platform = "x64" platform = "x64"
else: else: