Skip to content

Commit 4051fbd

Browse files
update nuget packaging
Signed-off-by: Nikolaj Bjorner <[email protected]>
1 parent f086f01 commit 4051fbd

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

scripts/mk_nuget_task.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,6 @@ def create_nuget_spec(release_version, release_commit):
100100
with open("out/Microsoft.Z3.x64.nuspec", 'w') as f:
101101
f.write(contents)
102102

103-
def create_nuget_package():
104-
subprocess.call(["nuget", "pack"], cwd="out")
105-
106103
nuget_sign_input = """
107104
{
108105
"Version": "1.0.0",
@@ -143,13 +140,12 @@ def create_nuget_package():
143140
]
144141
}"""
145142

146-
def sign_nuget_package():
143+
def create_sign_input(release_version):
147144
package_name = "Microsoft.Z3.x64.%s.nupkg" % release_version
148145
input_file = "out/nuget_sign_input.json"
149146
output_path = os.path.abspath("out").replace("\\","\\\\")
150147
with open(input_file, 'w') as f:
151148
f.write(nuget_sign_input % (output_path, output_path, release_version, release_version))
152-
subprocess.call(["EsrpClient.exe", "sign", "-a", "authorization.json", "-p", "policy.json", "-i", input_file, "-o", "out\\diagnostics.json"])
153149

154150

155151
def main():
@@ -161,8 +157,9 @@ def main():
161157
unpack(packages)
162158
mk_targets()
163159
create_nuget_spec(release_version, release_commit)
164-
create_nuget_package()
165-
sign_nuget_package(release_version)
160+
create_sign_input(release_version)
161+
# create_nuget_package()
162+
# sign_nuget_package(release_version)
166163

167164

168165
main()

scripts/nightly.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
variables:
2+
z3Version: '4.8.7'
3+
14
jobs:
25

36
- job: Mac
@@ -90,8 +93,16 @@ jobs:
9093
targetPath: tmp
9194
- script: |
9295
cd scripts
93-
python mk_nuget_task.py ../tmp 4.8.7 3424ffa
96+
python mk_nuget_task.py ../tmp $(z3Version) 3424ffa
9497
cd ..
98+
- task: NuGetCommand@2
99+
inputs:
100+
command: pack
101+
basePath: scripts/out
102+
- script: |
103+
cd scripts
104+
EsprClient.exe sign -a authorization.json -p policy.json -i out/nuget_sign_input.json -o out/diagnostics.json
105+
cd ..
95106
96107
- job: Python
97108
displayName: "Python packaging"

0 commit comments

Comments
 (0)