Skip to content

Commit

Permalink
Enable SourceLink and deterministic builds
Browse files Browse the repository at this point in the history
These settings enable SourceLink, whereby users of published NetMQ packages
can step into the source of the library itself in IDEs that support it,
such as Visual Studio.

Also enables deterministic builds.
  • Loading branch information
drewnoakes committed May 15, 2020
1 parent 5f5eb5a commit 024d42c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
9 changes: 9 additions & 0 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project>
<!-- Workaround for https://github.com/dotnet/sourcelink/issues/572 -->
<PropertyGroup>
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
</PropertyGroup>
<ItemGroup>
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/>
</ItemGroup>
</Project>
7 changes: 4 additions & 3 deletions src/NetMQ.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.9
# Visual Studio Version 16
VisualStudioVersion = 16.0.30104.148
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Performance", "Performance", "{1D49A4C6-C03C-4F72-9A27-42C8E5219BBA}"
EndProject
Expand All @@ -12,13 +12,15 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
..\.travis.yml = ..\.travis.yml
..\appveyor.yml = ..\appveyor.yml
..\COPYING.LESSER = ..\COPYING.LESSER
Directory.Build.targets = Directory.Build.targets
..\mkdocs.yml = ..\mkdocs.yml
..\README.md = ..\README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{FF13931E-D7A0-489E-9530-0F972DAE1167}"
ProjectSection(SolutionItems) = preProject
..\docs\actor.md = ..\docs\actor.md
..\docs\async-await.md = ..\docs\async-await.md
..\docs\beacon.md = ..\docs\beacon.md
..\docs\cleanup.md = ..\docs\cleanup.md
..\docs\devices.md = ..\docs\devices.md
Expand All @@ -39,7 +41,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{FF13931E-D
..\docs\timer.md = ..\docs\timer.md
..\docs\transports.md = ..\docs\transports.md
..\docs\xpub-xsub.md = ..\docs\xpub-xsub.md
..\docs\async-await.md = ..\docs\async-await.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetMQ", "NetMQ\NetMQ.csproj", "{49C06317-631D-435F-BE51-A26618FBC2C1}"
Expand Down
8 changes: 7 additions & 1 deletion src/NetMQ/NetMQ.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@
<PackageProjectUrl>https://github.com/zeromq/netmq</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/zeromq/netmq/blob/master/COPYING.LESSER</PackageLicenseUrl>
<RepositoryType>git</RepositoryType>
<IncludeSymbols>true</IncludeSymbols>
<RepositoryUrl>https://github.com/zeromq/netmq.git</RepositoryUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<Deterministic>true</Deterministic>
<DeterministicSourcePaths>true</DeterministicSourcePaths>
<IncludeSource>true</IncludeSource>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

Expand All @@ -32,6 +37,7 @@
<ItemGroup>
<PackageReference Include="AsyncIO" Version="0.1.69" />
<PackageReference Include="JetBrains.Annotations" Version="10.4.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="NaCl.Net" Version="0.1.6-pre" />
</ItemGroup>

Expand Down

0 comments on commit 024d42c

Please sign in to comment.