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