Skip to content

add SourceLink support #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ insert_final_newline = true
indent_style = space
indent_size = 4

[*.{csproj,json,config,yml}]
[*.{csproj,json,config,yml,props}]
indent_size = 2

[*.sh]
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ matrix:
- os: linux
dist: trusty
sudo: required
dotnet: 2.0.0
dotnet: 2.1.300
group: edge
script:
- ./build.sh
6 changes: 3 additions & 3 deletions Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ foreach ($src in ls src/*) {

echo "build: Packaging project in $src"

& dotnet build -c Release --version-suffix=$buildSuffix
& dotnet build -c Release --version-suffix=$buildSuffix -p:EnableSourceLink=true
if ($suffix) {
& dotnet pack -c Release --include-source -o ..\..\artifacts --version-suffix=$suffix --no-build
& dotnet pack -c Release -o ..\..\artifacts --version-suffix=$suffix --no-build
} else {
& dotnet pack -c Release --include-source -o ..\..\artifacts --no-build
& dotnet pack -c Release -o ..\..\artifacts --no-build
}
if($LASTEXITCODE -ne 0) { exit 1 }

Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dotnet --info
dotnet restore

for path in src/**/*.csproj; do
dotnet build -f netstandard1.3 -c Release ${path}
dotnet build -f netstandard1.3 -c Release ${path} -p:EnableSourceLink=true
done

for path in test/*.Tests/*.csproj; do
Expand Down
7 changes: 6 additions & 1 deletion src/Serilog.Sinks.File/Serilog.Sinks.File.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Description>Write Serilog events to text files in plain or JSON format.</Description>
Expand All @@ -23,9 +23,14 @@
<AssemblyName>Serilog.Sinks.File</AssemblyName>
<!-- Don't reference the full NETStandard.Library -->
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<!-- SourceLink configuration -->
<EnableSourceLink Condition="'$(EnableSourceLink)' == ''">false</EnableSourceLink>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta-63127-02" PrivateAssets="All"/>
<PackageReference Include="Serilog" Version="2.5.0" />
</ItemGroup>

Expand Down