diff --git a/.gitignore b/.gitignore index 72dc1f79..202aff2c 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,3 @@ *.dylib *.so *.zip - -# nuget package placeholder -*.here diff --git a/NuGet.exe b/NuGet.exe deleted file mode 100644 index 9ca66594..00000000 Binary files a/NuGet.exe and /dev/null differ diff --git a/UpdateLibgit2ToSha.ps1 b/UpdateLibgit2ToSha.ps1 index 34b5e8e0..c073d592 100644 --- a/UpdateLibgit2ToSha.ps1 +++ b/UpdateLibgit2ToSha.ps1 @@ -88,42 +88,38 @@ Push-Location $libgit2Directory $binaryFilename = "git2-" + $sha.Substring(0,7) } - sc -Encoding ASCII (Join-Path $projectDirectory "nuget.package\libgit2\libgit2_hash.txt") $sha - sc -Encoding ASCII (Join-Path $projectDirectory "nuget.package\libgit2\libgit2_filename.txt") $binaryFilename + sc -Encoding ASCII (Join-Path $projectDirectory "nuget.package\contentFiles\any\any\libgit2_hash.txt") $sha + sc -Encoding ASCII (Join-Path $projectDirectory "nuget.package\contentFiles\any\any\libgit2_filename.txt") $binaryFilename $buildProperties = @" - - - - - + lib\win32\x64\$binaryFilename.dll PreserveNewest - + lib\win32\x64\$binaryFilename.pdb PreserveNewest - + lib\win32\x86\$binaryFilename.dll PreserveNewest - + lib\win32\x86\$binaryFilename.pdb PreserveNewest - + lib\osx\lib$binaryFilename.dylib PreserveNewest - + lib\linux\x86_64\lib$binaryFilename.so PreserveNewest - + LibGit2Sharp.dll.config PreserveNewest @@ -131,7 +127,7 @@ Push-Location $libgit2Directory "@ - sc -Encoding UTF8 (Join-Path $projectDirectory "nuget.package\build\LibGit2Sharp.NativeBinaries.props") $buildProperties + sc -Encoding UTF8 (Join-Path $projectDirectory "nuget.package\build\net40\LibGit2Sharp.NativeBinaries.props") $buildProperties $dllConfig = @" diff --git a/build.libgit2.ps1 b/build.libgit2.ps1 index 6e683e40..9eb1be23 100644 --- a/build.libgit2.ps1 +++ b/build.libgit2.ps1 @@ -22,7 +22,7 @@ $projectDirectory = Split-Path $MyInvocation.MyCommand.Path $libgit2Directory = Join-Path $projectDirectory "libgit2" $x86Directory = Join-Path $projectDirectory "nuget.package\runtimes\win7-x86\native" $x64Directory = Join-Path $projectDirectory "nuget.package\runtimes\win7-x64\native" -$hashFile = Join-Path $projectDirectory "nuget.package\libgit2\libgit2_hash.txt" +$hashFile = Join-Path $projectDirectory "nuget.package\contentFiles\any\any\libgit2_hash.txt" $sha = Get-Content $hashFile if (![string]::IsNullOrEmpty($libgit2Name)) { diff --git a/build.libgit2.sh b/build.libgit2.sh index 61a6b269..0676b098 100755 --- a/build.libgit2.sh +++ b/build.libgit2.sh @@ -1,6 +1,6 @@ #!/bin/bash -LIBGIT2SHA=`cat ./nuget.package/libgit2/libgit2_hash.txt` +LIBGIT2SHA=`cat ./nuget.package/contentFiles/any/any/libgit2_hash.txt` SHORTSHA=${LIBGIT2SHA:0:7} rm -rf libgit2/build diff --git a/buildpackage.ps1 b/buildpackage.ps1 index 2398faae..f5ae3434 100644 --- a/buildpackage.ps1 +++ b/buildpackage.ps1 @@ -17,25 +17,21 @@ $linuxDirectory = Join-Path $projectDirectory "nuget.package\runtimes\linux-x64\ if ( -Not (Test-Path $x86Directory\*.dll) ) { mkdir -fo $x86Directory > $null - Set-Content $x86Directory\addbinaries.here $null } if ( -Not (Test-Path $x64Directory\*.dll) ) { mkdir -fo $x64Directory > $null - Set-Content $x64Directory\addbinaries.here $null } if ( -Not (Test-Path $osxDirectory\*.dylib) ) { mkdir -fo $osxDirectory > $null - Set-Content $osxDirectory\addbinaries.here $null } if ( -Not (Test-Path $linuxDirectory\*.so) ) { mkdir -fo $linuxDirectory > $null - Set-Content $linuxDirectory\addbinaries.here $null } -.\Nuget.exe Pack nuget.package\NativeBinaries.nuspec -Version $version$versionSuffix -NoPackageAnalysis +.\nuget.exe Pack nuget.package\NativeBinaries.nuspec -Version $version$versionSuffix -NoPackageAnalysis diff --git a/download.build.artifacts.and.package.ps1 b/download.build.artifacts.and.package.ps1 index 849fec9f..d83ecb01 100644 --- a/download.build.artifacts.and.package.ps1 +++ b/download.build.artifacts.and.package.ps1 @@ -137,9 +137,7 @@ Add-Type -assembly "System.Io.Compression.Filesystem" Write-Host -ForegroundColor "Yellow" "Including non Windows build artifacts" Move-Item "$($linuxBins.FullName).ext\libgit2\linux-x64\native\*.so" "$($package.FullName).ext\runtimes\linux-x64\native" -Remove-Item "$($package.FullName).ext\runtimes\linux-x64\native\addbinaries.here" Move-Item "$($osxBins.FullName).ext\libgit2\osx\native\*.dylib" "$($package.FullName).ext\runtimes\osx\native" -Remove-Item "$($package.FullName).ext\runtimes\osx\native\addbinaries.here" Write-Host -ForegroundColor "Yellow" "Building final NuGet package" Push-location "$($package.FullName).ext" diff --git a/nuget.exe b/nuget.exe new file mode 100644 index 00000000..856263de Binary files /dev/null and b/nuget.exe differ diff --git a/nuget.package/NativeBinaries.nuspec b/nuget.package/NativeBinaries.nuspec index 1e6977c3..ea37928b 100644 --- a/nuget.package/NativeBinaries.nuspec +++ b/nuget.package/NativeBinaries.nuspec @@ -10,5 +10,8 @@ https://raw.githubusercontent.com/libgit2/libgit2sharp/master/square-logo.png false Native binaries for LibGit2Sharp + + + diff --git a/nuget.package/build/LibGit2Sharp.NativeBinaries.props b/nuget.package/build/net40/LibGit2Sharp.NativeBinaries.props similarity index 58% rename from nuget.package/build/LibGit2Sharp.NativeBinaries.props rename to nuget.package/build/net40/LibGit2Sharp.NativeBinaries.props index d66fd534..c6d2ddb1 100644 --- a/nuget.package/build/LibGit2Sharp.NativeBinaries.props +++ b/nuget.package/build/net40/LibGit2Sharp.NativeBinaries.props @@ -1,35 +1,31 @@  - - - - - + lib\win32\x64\git2-15e1193.dll PreserveNewest - + lib\win32\x64\git2-15e1193.pdb PreserveNewest - + lib\win32\x86\git2-15e1193.dll PreserveNewest - + lib\win32\x86\git2-15e1193.pdb PreserveNewest - + lib\osx\libgit2-15e1193.dylib PreserveNewest - + lib\linux\x86_64\libgit2-15e1193.so PreserveNewest - + LibGit2Sharp.dll.config PreserveNewest diff --git a/nuget.package/libgit2/libgit2_filename.txt b/nuget.package/contentFiles/any/any/libgit2_filename.txt similarity index 100% rename from nuget.package/libgit2/libgit2_filename.txt rename to nuget.package/contentFiles/any/any/libgit2_filename.txt diff --git a/nuget.package/libgit2/libgit2_hash.txt b/nuget.package/contentFiles/any/any/libgit2_hash.txt similarity index 100% rename from nuget.package/libgit2/libgit2_hash.txt rename to nuget.package/contentFiles/any/any/libgit2_hash.txt