Skip to content

Commit af4eb02

Browse files
author
Cameron Taggart
committed
fix libgit2#876 adds source indexing using SourceLink.exe
changed based on libgit2#1003
1 parent 7cbd0c6 commit af4eb02

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

appveyor.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ install:
3939
$ShouldPublishNugetArtifact = "$($env:APPVEYOR_PULL_REQUEST_NUMBER -eq $null)"
4040
$Env:SHOULD_PUBLISH_NUGET_ARTIFACT = $ShouldPublishNugetArtifact
4141
Write-Host "Should publish Nuget artifact = $($Env:SHOULD_PUBLISH_NUGET_ARTIFACT)"
42+
cinst sourcelink -pre -y
4243
4344
assembly_info:
4445
patch: true
@@ -53,6 +54,9 @@ cache:
5354
before_build:
5455
- nuget restore "%APPVEYOR_BUILD_FOLDER%\LibGit2Sharp.sln"
5556

57+
after_build:
58+
- ps: sourcelink -u 'https://raw.githubusercontent.com/libgit2/libgit2sharp/{0}/%var2%' -pr LibGit2Sharp\LibGit2Sharp.csproj -pp Configuration Release -nf LibGit2Sharp\Core\UniqueIdentifier.cs
59+
5660
build_script:
5761
- msbuild "%APPVEYOR_BUILD_FOLDER%\LibGit2Sharp.sln" /verbosity:normal /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /property:ExtraDefine="LEAKS_IDENTIFYING"
5862

@@ -65,10 +69,10 @@ on_success:
6569
& "$env:APPVEYOR_BUILD_FOLDER\nuget.package\BuildNugetPackage.ps1" "$env:APPVEYOR_REPO_COMMIT"
6670
Add-Type -Path "$env:APPVEYOR_BUILD_FOLDER\LibGit2Sharp\bin\Release\LibGit2Sharp.dll"
6771
Write-Host "LibGit2Sharp version = $([LibGit2Sharp.GlobalSettings]::Version)" -ForegroundColor "Magenta"
68-
If ($Env:SHOULD_PUBLISH_NUGET_ARTIFACT -eq $True)
69-
{
72+
#If ($Env:SHOULD_PUBLISH_NUGET_ARTIFACT -eq $True)
73+
#{
7074
Get-ChildItem "$env:APPVEYOR_BUILD_FOLDER\LibGit2sharp\*.nupkg" | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
71-
}
75+
#}
7276
7377
notifications:
7478
- provider: Email

nuget.package/BuildNugetPackage.ps1

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@ $projectPath = Join-Path $root "..\LibGit2Sharp"
5858

5959
Remove-Item (Join-Path $projectPath "*.nupkg")
6060

61-
Clean-OutputFolder (Join-Path $projectPath "bin\")
62-
Clean-OutputFolder (Join-Path $projectPath "obj\")
63-
6461
# The nuspec file needs to be next to the csproj, so copy it there during the pack operation
6562
Copy-Item (Join-Path $root "LibGit2Sharp.nuspec") $projectPath
6663

@@ -69,10 +66,7 @@ Push-Location $projectPath
6966
try {
7067
Set-Content -Encoding ASCII $(Join-Path $projectPath "libgit2sharp_hash.txt") $commitSha
7168
Run-Command { & "$(Join-Path $projectPath "..\Lib\NuGet\Nuget.exe")" Restore "$(Join-Path $projectPath "..\LibGit2Sharp.sln")" }
72-
73-
# Cf. https://stackoverflow.com/questions/21728450/nuget-exclude-files-from-symbols-package-in-nuspec
74-
Run-Command { & "$(Join-Path $projectPath "..\Lib\NuGet\Nuget.exe")" Pack -Build -Symbols "$(Join-Path $projectPath "LibGit2Sharp.csproj")" -Prop Configuration=Release -Exclude "**/NativeBinaries/**/*.*"}
75-
Run-Command { & "$(Join-Path $projectPath "..\Lib\NuGet\Nuget.exe")" Pack "$(Join-Path $projectPath "LibGit2Sharp.csproj")" -Prop Configuration=Release }
69+
Run-Command { & "$(Join-Path $projectPath "..\Lib\NuGet\Nuget.exe")" Pack -Prop Configuration=Release }
7670
}
7771
finally {
7872
Pop-Location

nuget.package/LibGit2Sharp.nuspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@
2424
<file src="..\CHANGES.md" target="App_Readme\LibGit2Sharp.CHANGES.md" />
2525
<file src="..\nuget.package\build\*.*" target="build\net40" />
2626
<file src="..\Lib\NativeBinaries\libgit2.license.txt" target="App_Readme" />
27+
<file src="bin\$configuration$\$id$.pdb" target="lib\net40" />
2728
</files>
2829
</package>

0 commit comments

Comments
 (0)