Skip to content

Commit d2856bf

Browse files
authored
Merge pull request #65 from lrushl/sourcelink-support
add SourceLink support
2 parents 543d861 + 1270a76 commit d2856bf

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ insert_final_newline = true
66
indent_style = space
77
indent_size = 4
88

9-
[*.{csproj,json,config,yml}]
9+
[*.{csproj,json,config,yml,props}]
1010
indent_size = 2
1111

1212
[*.sh]

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ matrix:
55
- os: linux
66
dist: trusty
77
sudo: required
8-
dotnet: 2.0.0
8+
dotnet: 2.1.300
99
group: edge
1010
script:
1111
- ./build.sh

Build.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ foreach ($src in ls src/*) {
2323

2424
echo "build: Packaging project in $src"
2525

26-
& dotnet build -c Release --version-suffix=$buildSuffix
26+
& dotnet build -c Release --version-suffix=$buildSuffix -p:EnableSourceLink=true
2727
if ($suffix) {
28-
& dotnet pack -c Release --include-source -o ..\..\artifacts --version-suffix=$suffix --no-build
28+
& dotnet pack -c Release -o ..\..\artifacts --version-suffix=$suffix --no-build
2929
} else {
30-
& dotnet pack -c Release --include-source -o ..\..\artifacts --no-build
30+
& dotnet pack -c Release -o ..\..\artifacts --no-build
3131
}
3232
if($LASTEXITCODE -ne 0) { exit 1 }
3333

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ dotnet --info
33
dotnet restore
44

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

99
for path in test/*.Tests/*.csproj; do

src/Serilog.Sinks.File/Serilog.Sinks.File.csproj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

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

2832
<ItemGroup>
33+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta-63127-02" PrivateAssets="All"/>
2934
<PackageReference Include="Serilog" Version="2.5.0" />
3035
</ItemGroup>
3136

0 commit comments

Comments
 (0)