@@ -91,8 +91,11 @@ function Download-Travis-Artifacts($statuses, $downloadLocation) {
91
91
92
92
$buildNumber = $build.number
93
93
94
- ForEach ($platform in @ (" linux" , " osx" )) {
95
- $artifactFileName = " binaries-$platform -$buildNumber .zip"
94
+ Write-Host - ForegroundColor " Yellow" " Retrieving Bintray version `" $buildNumber `" artifact list"
95
+ $files = Invoke-RestMethod - Ex " https://api.bintray.com/packages/libgit2/compiled-binaries/libgit2/versions/$buildNumber /files"
96
+
97
+ ForEach ($file in $files ) {
98
+ $artifactFileName = $file.name
96
99
$localArtifactPath = " $downloadLocation \$artifactFileName "
97
100
98
101
Write-Host - ForegroundColor " Yellow" " Downloading `" $artifactFileName `" "
@@ -128,18 +131,15 @@ Download-Travis-Artifacts $statuses $path
128
131
Write-Host - ForegroundColor " Yellow" " Build artifacts have been downloaded at `" $path `" "
129
132
130
133
$package = Get-ChildItem - Path $path - Filter " *.nupkg"
131
- $linuxBins = Get-ChildItem - Path $path - Filter " binaries-linux-*.zip"
132
- $osxBins = Get-ChildItem - Path $path - Filter " binaries-osx-*.zip"
134
+ $binaries = Get-ChildItem - Path $path - Filter " *.zip"
133
135
134
136
Write-Host - ForegroundColor " Yellow" " Extracting build artifacts"
135
- Add-Type - assembly " System.Io.Compression.Filesystem"
136
- [Io.Compression.ZipFile ]::ExtractToDirectory(" $ ( $package.FullName ) " , " $ ( $package.FullName ) .ext" )
137
- [Io.Compression.ZipFile ]::ExtractToDirectory(" $ ( $linuxBins.FullName ) " , " $ ( $linuxBins.FullName ) .ext" )
138
- [Io.Compression.ZipFile ]::ExtractToDirectory(" $ ( $osxBins.FullName ) " , " $ ( $osxBins.FullName ) .ext" )
139
-
140
- Write-Host - ForegroundColor " Yellow" " Including non Windows build artifacts"
141
- Move-Item " $ ( $linuxBins.FullName ) .ext\libgit2\linux-x64\native\*.so" " $ ( $package.FullName ) .ext\runtimes\linux-x64\native"
142
- Move-Item " $ ( $osxBins.FullName ) .ext\libgit2\osx\native\*.dylib" " $ ( $package.FullName ) .ext\runtimes\osx\native"
137
+ Add-Type - assembly " System.IO.Compression.Filesystem"
138
+ [IO.Compression.ZipFile ]::ExtractToDirectory(" $ ( $package.FullName ) " , " $ ( $package.FullName ) .ext" )
139
+
140
+ ForEach ($binary in $binaries ) {
141
+ [IO.Compression.ZipFile ]::ExtractToDirectory(" $ ( $binary.FullName ) " , " $ ( $package.FullName ) .ext" )
142
+ }
143
143
144
144
Write-Host - ForegroundColor " Yellow" " Building final NuGet package"
145
145
Push-location " $ ( $package.FullName ) .ext"
0 commit comments