2
2
# Copyright (c) 2018 Microsoft Corporation
3
3
#
4
4
5
- # 1. download releases from github
5
+ # 1. copy over dlls
6
6
# 2. copy over libz3.dll for the different architectures
7
7
# 3. copy over Microsoft.Z3.dll from suitable distribution
8
8
# 4. copy nuspec file from packages
16
16
import os .path
17
17
import shutil
18
18
import subprocess
19
- import mk_util
20
- import mk_project
21
19
22
20
def mk_dir (d ):
23
21
if not os .path .exists (d ):
@@ -59,7 +57,7 @@ def unpack(packages):
59
57
zip_ref = zipfile .ZipFile (path , 'r' )
60
58
zip_ref .extract ("%s/bin/libz3.%s" % (package_dir , ext ), "tmp" )
61
59
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 )
63
61
if "x64-win" in f :
64
62
mk_dir ("out/lib/netstandard1.4/" )
65
63
for b in ["Microsoft.Z3.dll" ]:
@@ -70,7 +68,7 @@ def mk_targets():
70
68
mk_dir ("out/build" )
71
69
shutil .copy ("../src/api/dotnet/Microsoft.Z3.targets.in" , "out/build/Microsoft.Z3.targets" )
72
70
73
- def create_nuget_spec ():
71
+ def create_nuget_spec (release_version , release_commit ):
74
72
contents = """<?xml version="1.0" encoding="utf-8"?>
75
73
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
76
74
<metadata>
@@ -156,13 +154,15 @@ def sign_nuget_package():
156
154
157
155
def main ():
158
156
packages = sys .argv [1 ]
157
+ release_version = sys .argv [2 ]
158
+ release_commit = sys .argv [3 ]
159
159
print (packages )
160
160
mk_dir (packages )
161
161
unpack (packages )
162
162
mk_targets ()
163
- create_nuget_spec ()
163
+ create_nuget_spec (release_version , release_commit )
164
164
create_nuget_package ()
165
- sign_nuget_package ()
165
+ sign_nuget_package (release_version )
166
166
167
167
168
168
main ()
0 commit comments