From f1b02f05f139edb8454005ed719e1baf77461050 Mon Sep 17 00:00:00 2001 From: Geert van Horrik Date: Wed, 18 Mar 2015 16:21:01 +0100 Subject: [PATCH 1/4] Added GitLink support --- appveyor.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index dff792e28..2c5d7809d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -39,6 +39,7 @@ install: $ShouldPublishNugetArtifact = "$($env:APPVEYOR_PULL_REQUEST_NUMBER -eq $null)" $Env:SHOULD_PUBLISH_NUGET_ARTIFACT = $ShouldPublishNugetArtifact Write-Host "Should publish Nuget artifact = $($Env:SHOULD_PUBLISH_NUGET_ARTIFACT)" +- cinst gitlink -Pre -y assembly_info: patch: true @@ -53,6 +54,9 @@ cache: before_build: - nuget restore "%APPVEYOR_BUILD_FOLDER%\LibGit2Sharp.sln" +after_build: + cmd: gitlink %APPVEYOR_BUILD_FOLDER% -u https://github.com/libgit2/libgit2sharp -b %APPVEYOR_REPO_BRANCH% -s %APPVEYOR_REPO_COMMIT% + build_script: - msbuild "%APPVEYOR_BUILD_FOLDER%\LibGit2Sharp.sln" /verbosity:normal /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /property:ExtraDefine="LEAKS_IDENTIFYING" @@ -65,10 +69,10 @@ on_success: & "$env:APPVEYOR_BUILD_FOLDER\nuget.package\BuildNugetPackage.ps1" "$env:APPVEYOR_REPO_COMMIT" Add-Type -Path "$env:APPVEYOR_BUILD_FOLDER\LibGit2Sharp\bin\Release\LibGit2Sharp.dll" Write-Host "LibGit2Sharp version = $([LibGit2Sharp.GlobalSettings]::Version)" -ForegroundColor "Magenta" - If ($Env:SHOULD_PUBLISH_NUGET_ARTIFACT -eq $True) - { + #If ($Env:SHOULD_PUBLISH_NUGET_ARTIFACT -eq $True) + #{ Get-ChildItem "$env:APPVEYOR_BUILD_FOLDER\LibGit2sharp\*.nupkg" | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } - } + #} notifications: - provider: Email From 2d97d74bc737b819c022195ed07d46f06bb998f8 Mon Sep 17 00:00:00 2001 From: Geert van Horrik Date: Thu, 19 Mar 2015 16:52:36 +0100 Subject: [PATCH 2/4] Updated files on request --- nuget.package/BuildNugetPackage.ps1 | 3 +-- nuget.package/LibGit2Sharp.nuspec | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nuget.package/BuildNugetPackage.ps1 b/nuget.package/BuildNugetPackage.ps1 index 5dac796e0..c5b623f14 100644 --- a/nuget.package/BuildNugetPackage.ps1 +++ b/nuget.package/BuildNugetPackage.ps1 @@ -71,8 +71,7 @@ try { Run-Command { & "$(Join-Path $projectPath "..\Lib\NuGet\Nuget.exe")" Restore "$(Join-Path $projectPath "..\LibGit2Sharp.sln")" } # Cf. https://stackoverflow.com/questions/21728450/nuget-exclude-files-from-symbols-package-in-nuspec - Run-Command { & "$(Join-Path $projectPath "..\Lib\NuGet\Nuget.exe")" Pack -Build -Symbols "$(Join-Path $projectPath "LibGit2Sharp.csproj")" -Prop Configuration=Release -Exclude "**/NativeBinaries/**/*.*"} - Run-Command { & "$(Join-Path $projectPath "..\Lib\NuGet\Nuget.exe")" Pack "$(Join-Path $projectPath "LibGit2Sharp.csproj")" -Prop Configuration=Release } + Run-Command { & "$(Join-Path $projectPath "..\Lib\NuGet\Nuget.exe")" Pack -Build "$(Join-Path $projectPath "LibGit2Sharp.csproj")" -Prop Configuration=Release } } finally { Pop-Location diff --git a/nuget.package/LibGit2Sharp.nuspec b/nuget.package/LibGit2Sharp.nuspec index f605336c7..3b9974187 100644 --- a/nuget.package/LibGit2Sharp.nuspec +++ b/nuget.package/LibGit2Sharp.nuspec @@ -24,5 +24,6 @@ + From 39766bf6ba190d115dae98c519564acbd432b554 Mon Sep 17 00:00:00 2001 From: Geert van Horrik Date: Thu, 19 Mar 2015 20:14:23 +0100 Subject: [PATCH 3/4] Removed -Build from nuget script call --- nuget.package/BuildNugetPackage.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nuget.package/BuildNugetPackage.ps1 b/nuget.package/BuildNugetPackage.ps1 index c5b623f14..17bd8a734 100644 --- a/nuget.package/BuildNugetPackage.ps1 +++ b/nuget.package/BuildNugetPackage.ps1 @@ -71,7 +71,7 @@ try { Run-Command { & "$(Join-Path $projectPath "..\Lib\NuGet\Nuget.exe")" Restore "$(Join-Path $projectPath "..\LibGit2Sharp.sln")" } # Cf. https://stackoverflow.com/questions/21728450/nuget-exclude-files-from-symbols-package-in-nuspec - Run-Command { & "$(Join-Path $projectPath "..\Lib\NuGet\Nuget.exe")" Pack -Build "$(Join-Path $projectPath "LibGit2Sharp.csproj")" -Prop Configuration=Release } + Run-Command { & "$(Join-Path $projectPath "..\Lib\NuGet\Nuget.exe")" Pack -Prop Configuration=Release } } finally { Pop-Location From 0e3011ec84ca9a2339da59322ad7b8cd3acfbc5a Mon Sep 17 00:00:00 2001 From: Geert van Horrik Date: Thu, 19 Mar 2015 22:53:03 +0100 Subject: [PATCH 4/4] More changes on request --- nuget.package/BuildNugetPackage.ps1 | 3 --- 1 file changed, 3 deletions(-) diff --git a/nuget.package/BuildNugetPackage.ps1 b/nuget.package/BuildNugetPackage.ps1 index 17bd8a734..4ff14a448 100644 --- a/nuget.package/BuildNugetPackage.ps1 +++ b/nuget.package/BuildNugetPackage.ps1 @@ -58,9 +58,6 @@ $projectPath = Join-Path $root "..\LibGit2Sharp" Remove-Item (Join-Path $projectPath "*.nupkg") -Clean-OutputFolder (Join-Path $projectPath "bin\") -Clean-OutputFolder (Join-Path $projectPath "obj\") - # The nuspec file needs to be next to the csproj, so copy it there during the pack operation Copy-Item (Join-Path $root "LibGit2Sharp.nuspec") $projectPath