Skip to content

Commit

Permalink
update nuget packaging
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
  • Loading branch information
NikolajBjorner committed Oct 21, 2019
1 parent f086f01 commit 4051fbd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
11 changes: 4 additions & 7 deletions scripts/mk_nuget_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@ def create_nuget_spec(release_version, release_commit):
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",
Expand Down Expand Up @@ -143,13 +140,12 @@ def create_nuget_package():
]
}"""

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():
Expand All @@ -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()
13 changes: 12 additions & 1 deletion scripts/nightly.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
variables:
z3Version: '4.8.7'

jobs:

- job: Mac
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 4051fbd

Please sign in to comment.