Skip to content

Commit f086f01

Browse files
update nuget script
Signed-off-by: Nikolaj Bjorner <[email protected]>
1 parent 928e08f commit f086f01

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

scripts/mk_nuget_task.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copyright (c) 2018 Microsoft Corporation
33
#
44

5-
# 1. download releases from github
5+
# 1. copy over dlls
66
# 2. copy over libz3.dll for the different architectures
77
# 3. copy over Microsoft.Z3.dll from suitable distribution
88
# 4. copy nuspec file from packages
@@ -16,8 +16,6 @@
1616
import os.path
1717
import shutil
1818
import subprocess
19-
import mk_util
20-
import mk_project
2119

2220
def mk_dir(d):
2321
if not os.path.exists(d):
@@ -59,7 +57,7 @@ def unpack(packages):
5957
zip_ref = zipfile.ZipFile(path, 'r')
6058
zip_ref.extract("%s/bin/libz3.%s" % (package_dir, ext), "tmp")
6159
mk_dir("out/runtimes/%s/native" % dst)
62-
shutil.move("tmp/%s/bin/libz3.%s" % (package_dir, ext), "out/runtimes/%s/native/." % dst, "/y")
60+
shutil.move("tmp/%s/bin/libz3.%s" % (package_dir, ext), "out/runtimes/%s/native/." % dst)
6361
if "x64-win" in f:
6462
mk_dir("out/lib/netstandard1.4/")
6563
for b in ["Microsoft.Z3.dll"]:
@@ -70,7 +68,7 @@ def mk_targets():
7068
mk_dir("out/build")
7169
shutil.copy("../src/api/dotnet/Microsoft.Z3.targets.in", "out/build/Microsoft.Z3.targets")
7270

73-
def create_nuget_spec():
71+
def create_nuget_spec(release_version, release_commit):
7472
contents = """<?xml version="1.0" encoding="utf-8"?>
7573
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
7674
<metadata>
@@ -156,13 +154,15 @@ def sign_nuget_package():
156154

157155
def main():
158156
packages = sys.argv[1]
157+
release_version = sys.argv[2]
158+
release_commit = sys.argv[3]
159159
print(packages)
160160
mk_dir(packages)
161161
unpack(packages)
162162
mk_targets()
163-
create_nuget_spec()
163+
create_nuget_spec(release_version, release_commit)
164164
create_nuget_package()
165-
sign_nuget_package()
165+
sign_nuget_package(release_version)
166166

167167

168168
main()

scripts/nightly.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
targetPath: tmp
9191
- script: |
9292
cd scripts
93-
python mk_nuget_task.py ../tmp
93+
python mk_nuget_task.py ../tmp 4.8.7 3424ffa
9494
cd ..
9595
9696
- job: Python

0 commit comments

Comments
 (0)