Skip to content

Commit

Permalink
fix libgit2#876 adds source indexing using SourceLink.exe
Browse files Browse the repository at this point in the history
changed based on libgit2#1003
  • Loading branch information
Cameron Taggart committed Mar 22, 2015
1 parent 7cbd0c6 commit af4eb02
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
10 changes: 7 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 sourcelink -pre -y
assembly_info:
patch: true
Expand All @@ -53,6 +54,9 @@ cache:
before_build:
- nuget restore "%APPVEYOR_BUILD_FOLDER%\LibGit2Sharp.sln"

after_build:
- ps: sourcelink -u 'https://raw.githubusercontent.com/libgit2/libgit2sharp/{0}/%var2%' -pr LibGit2Sharp\LibGit2Sharp.csproj -pp Configuration Release -nf LibGit2Sharp\Core\UniqueIdentifier.cs

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"

Expand All @@ -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
Expand Down
8 changes: 1 addition & 7 deletions nuget.package/BuildNugetPackage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -69,10 +66,7 @@ Push-Location $projectPath
try {
Set-Content -Encoding ASCII $(Join-Path $projectPath "libgit2sharp_hash.txt") $commitSha
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 -Prop Configuration=Release }
}
finally {
Pop-Location
Expand Down
1 change: 1 addition & 0 deletions nuget.package/LibGit2Sharp.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@
<file src="..\CHANGES.md" target="App_Readme\LibGit2Sharp.CHANGES.md" />
<file src="..\nuget.package\build\*.*" target="build\net40" />
<file src="..\Lib\NativeBinaries\libgit2.license.txt" target="App_Readme" />
<file src="bin\$configuration$\$id$.pdb" target="lib\net40" />
</files>
</package>

0 comments on commit af4eb02

Please sign in to comment.