Skip to content

Commit

Permalink
SourceLink support
Browse files Browse the repository at this point in the history
  • Loading branch information
cwe1ss committed Mar 1, 2018
1 parent ff37ca9 commit e24a140
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
8 changes: 8 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,19 @@
<NoWarn>$(NoWarn);CS1591</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>

<!-- SourceLink support -->
<DebugType>portable</DebugType>
<SourceLinkNoAutoLF>true</SourceLinkNoAutoLF>

<!-- There's currently a pack-warning because of the long "Description" tag. However, "Summary" is no longer supported.
This will be fixed in an upcoming version of nuget. The workaround for now is to just disable analysis.
https://github.com/NuGet/Home/issues/4587#issuecomment-288913324 -->
<NoPackageAnalysis>true</NoPackageAnalysis>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="SourceLink.Create.GitHub" Version="2.8.0" PrivateAssets="All" />
<DotNetCliToolReference Include="dotnet-sourcelink" Version="2.8.0" />
<DotNetCliToolReference Include="dotnet-sourcelink-git" Version="2.8.0" />
</ItemGroup>
</Project>
14 changes: 2 additions & 12 deletions build-definition.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,7 @@ Task dotnet-install {
Task dotnet-build {

# --no-incremental to ensure that CI builds always result in a clean build
if ([String]::IsNullOrWhiteSpace($VersionSuffix)) {
exec { dotnet build -c $BuildConfiguration --no-incremental }
}
else {
exec { dotnet build -c $BuildConfiguration --no-incremental --version-suffix $VersionSuffix }
}
exec { dotnet build -c $BuildConfiguration --no-incremental /p:CI=true /p:VersionSuffix=$VersionSuffix }
}

Task dotnet-test {
Expand Down Expand Up @@ -118,11 +113,6 @@ Task dotnet-pack {
Write-Host "Packaging $library to $libraryOutput"
Write-Host ""

if ([String]::IsNullOrWhiteSpace($VersionSuffix)) {
exec { dotnet pack $library -c $BuildConfiguration --no-restore --no-build --include-source --include-symbols -o $libraryOutput }
}
else {
exec { dotnet pack $library -c $BuildConfiguration --no-restore --no-build --include-source --include-symbols -o $libraryOutput --version-suffix $VersionSuffix }
}
exec { dotnet pack $library -c $BuildConfiguration --no-restore --no-build -o $libraryOutput /p:CI=true /p:VersionSuffix=$VersionSuffix }
}
}

0 comments on commit e24a140

Please sign in to comment.