Skip to content

Commit e26e775

Browse files
committed
Copy generated package to the workdir and remove temp folder
1 parent 071af35 commit e26e775

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

download.build.artifacts.and.package.ps1

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,8 @@ $osxBins = Get-ChildItem -Path $path -Filter "binaries-osx-*.zip"
112112
Write-Host -ForegroundColor "Yellow" "Extracting build artifacts"
113113
Add-Type -assembly "System.Io.Compression.Filesystem"
114114
[Io.Compression.ZipFile]::ExtractToDirectory("$($package.FullName)", "$($package.FullName).ext")
115-
Remove-Item "$($package.FullName)"
116115
[Io.Compression.ZipFile]::ExtractToDirectory("$($linuxBins.FullName)", "$($linuxBins.FullName).ext")
117-
Remove-Item "$($linuxBins.FullName)"
118116
[Io.Compression.ZipFile]::ExtractToDirectory("$($osxBins.FullName)", "$($osxBins.FullName).ext")
119-
Remove-Item "$($osxBins.FullName)"
120117

121118
Write-Host -ForegroundColor "Yellow" "Including non Windows build artifacts"
122119
Move-Item "$($linuxBins.FullName).ext\libgit2\linux\amd64\*.so" "$($package.FullName).ext\libgit2\linux\amd64"
@@ -130,7 +127,13 @@ Remove-Item -Path ".\_rels\" -Recurse
130127
Remove-Item -Path ".\package\" -Recurse
131128
Remove-Item -Path '.\`[Content_Types`].xml'
132129
& "$root/Nuget.exe" pack "LibGit2Sharp.NativeBinaries.nuspec" -OutputDirectory "$path" -NoPackageAnalysis -Verbosity "detailed"
130+
131+
$newPackage = Get-ChildItem -Path $path -Filter "*.nupkg"
133132
Pop-Location
134-
Remove-Item "$path\*.ext" -Recurse
135133

136-
explorer "$path"
134+
Write-Host -ForegroundColor "Yellow" "Copying package `"$($newPackage.Name)`" to `"$root`""
135+
136+
Move-Item -Path "$($newPackage.FullName)" -Destination "$root\$($newPackage.Name)"
137+
138+
Write-Host -ForegroundColor "Yellow" "Removing temporary folder"
139+
Remove-Item "$path" -Recurse

0 commit comments

Comments
 (0)