Skip to content

Commit bd2186c

Browse files
committed
Merge pull request #27 from libgit2/ntk/no-analysis
Disable PackageAnalysis mode while packing
2 parents 17fdeda + e26e775 commit bd2186c

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

download.build.artifacts.and.package.ps1

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -112,28 +112,28 @@ $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"
123120
Remove-Item "$($package.FullName).ext\libgit2\linux\amd64\addbinaries.here"
124121
Move-Item "$($osxBins.FullName).ext\libgit2\osx\*.dylib" "$($package.FullName).ext\libgit2\osx"
125122
Remove-Item "$($package.FullName).ext\libgit2\osx\addbinaries.here"
126123

127-
Write-Host -ForegroundColor "Yellow" "Listing binaries to be packaged"
128-
Foreach ($item in (Get-ChildItem "$path" -Filter "*git2-*.*" -Recurse))
129-
{
130-
Write-Host -ForegroundColor "White" "-> $($item.FullName)"
131-
}
132-
133124
Write-Host -ForegroundColor "Yellow" "Building final NuGet package"
134125
Push-location "$($package.FullName).ext"
135-
& "$root/Nuget.exe" pack "LibGit2Sharp.NativeBinaries.nuspec" -OutputDirectory "$path"
126+
Remove-Item -Path ".\_rels\" -Recurse
127+
Remove-Item -Path ".\package\" -Recurse
128+
Remove-Item -Path '.\`[Content_Types`].xml'
129+
& "$root/Nuget.exe" pack "LibGit2Sharp.NativeBinaries.nuspec" -OutputDirectory "$path" -NoPackageAnalysis -Verbosity "detailed"
130+
131+
$newPackage = Get-ChildItem -Path $path -Filter "*.nupkg"
136132
Pop-Location
137-
Remove-Item "$path\*.ext" -Recurse
138133

139-
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)