3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-06 09:34:08 +00:00

update nuget packaging

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2019-10-21 11:19:28 -07:00
parent f086f01ae0
commit 4051fbd8b2
2 changed files with 16 additions and 8 deletions

View file

@ -100,9 +100,6 @@ Linux Dependencies:
with open("out/Microsoft.Z3.x64.nuspec", 'w') as f:
f.write(contents)
def create_nuget_package():
subprocess.call(["nuget", "pack"], cwd="out")
nuget_sign_input = """
{
"Version": "1.0.0",
@ -143,13 +140,12 @@ nuget_sign_input = """
]
}"""
def sign_nuget_package():
def create_sign_input(release_version):
package_name = "Microsoft.Z3.x64.%s.nupkg" % release_version
input_file = "out/nuget_sign_input.json"
output_path = os.path.abspath("out").replace("\\","\\\\")
with open(input_file, 'w') as f:
f.write(nuget_sign_input % (output_path, output_path, release_version, release_version))
subprocess.call(["EsrpClient.exe", "sign", "-a", "authorization.json", "-p", "policy.json", "-i", input_file, "-o", "out\\diagnostics.json"])
def main():
@ -161,8 +157,9 @@ def main():
unpack(packages)
mk_targets()
create_nuget_spec(release_version, release_commit)
create_nuget_package()
sign_nuget_package(release_version)
create_sign_input(release_version)
# create_nuget_package()
# sign_nuget_package(release_version)
main()

View file

@ -1,3 +1,6 @@
variables:
z3Version: '4.8.7'
jobs:
- job: Mac
@ -90,8 +93,16 @@ jobs:
targetPath: tmp
- script: |
cd scripts
python mk_nuget_task.py ../tmp 4.8.7 3424ffa
python mk_nuget_task.py ../tmp $(z3Version) 3424ffa
cd ..
- task: NuGetCommand@2
inputs:
command: pack
basePath: scripts/out
- script: |
cd scripts
EsprClient.exe sign -a authorization.json -p policy.json -i out/nuget_sign_input.json -o out/diagnostics.json
cd ..
- job: Python
displayName: "Python packaging"