Skip to content

Commit 6fbba30

Browse files
authored
Merge pull request #39 from nils-a/feature/GH-30
(GH-30) enabled deterministic builds
2 parents 6fdf4a9 + f7f3ac7 commit 6fbba30

7 files changed

Lines changed: 49 additions & 0 deletions

File tree

src/Cake.AzurePipelines.Module/Cake.AzurePipelines.Module.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,9 @@
1414
<ItemGroup>
1515
<PackageReference Include="Cake.Core" Version="0.38.0" PrivateAssets="All" />
1616
<PackageReference Include="Cake.Common" Version="0.38.0" PrivateAssets="All" />
17+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0">
18+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
19+
<PrivateAssets>all</PrivateAssets>
20+
</PackageReference>
1721
</ItemGroup>
1822
</Project>

src/Cake.BuildSystems.Module/Cake.BuildSystems.Module.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<TargetFrameworks>netstandard2.0</TargetFrameworks>
55
<IncludeBuildOutput>false</IncludeBuildOutput>
66
<IsPackable>true</IsPackable>
7+
<IncludeSymbols>true</IncludeSymbols>
8+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
79
</PropertyGroup>
810

911
<PropertyGroup>

src/Cake.Module.Shared/Cake.Module.Shared.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,9 @@
1616
<ItemGroup>
1717
<PackageReference Include="Cake.Core" Version="0.38.0" PrivateAssets="All" />
1818
<PackageReference Include="Cake.Common" Version="0.38.0" PrivateAssets="All" />
19+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0">
20+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
21+
<PrivateAssets>all</PrivateAssets>
22+
</PackageReference>
1923
</ItemGroup>
2024
</Project>

src/Cake.MyGet.Module/Cake.MyGet.Module.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,9 @@
1414
<ItemGroup>
1515
<PackageReference Include="Cake.Core" Version="0.38.0" PrivateAssets="All" />
1616
<PackageReference Include="Cake.Common" Version="0.38.0" PrivateAssets="All" />
17+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0">
18+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
19+
<PrivateAssets>all</PrivateAssets>
20+
</PackageReference>
1721
</ItemGroup>
1822
</Project>

src/Cake.TeamCity.Module/Cake.TeamCity.Module.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,9 @@
1414
<ItemGroup>
1515
<PackageReference Include="Cake.Core" Version="0.38.0" PrivateAssets="All" />
1616
<PackageReference Include="Cake.Common" Version="0.38.0" PrivateAssets="All" />
17+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0">
18+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
19+
<PrivateAssets>all</PrivateAssets>
20+
</PackageReference>
1721
</ItemGroup>
1822
</Project>

src/Cake.TravisCI.Module/Cake.TravisCI.Module.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,9 @@
1414
<ItemGroup>
1515
<PackageReference Include="Cake.Core" Version="0.38.0" PrivateAssets="All" />
1616
<PackageReference Include="Cake.Common" Version="0.38.0" PrivateAssets="All" />
17+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0">
18+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
19+
<PrivateAssets>all</PrivateAssets>
20+
</PackageReference>
1721
</ItemGroup>
1822
</Project>

src/Directory.Build.targets

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
<!-- This target must be imported into Directory.Build.targets -->
3+
<!-- Workaround. Remove once we're targeting the 3.1.300+ SDK
4+
https://github.com/dotnet/sourcelink/issues/572 -->
5+
<Project>
6+
<PropertyGroup>
7+
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
8+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
9+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
10+
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
11+
</PropertyGroup>
12+
<ItemGroup>
13+
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/>
14+
</ItemGroup>
15+
<ItemGroup>
16+
<SourceRoot Include="$([MSBuild]::EnsureTrailingSlash($(NuGetPackageRoot)))" />
17+
</ItemGroup>
18+
19+
<Target Name="CoverletGetPathMap"
20+
DependsOnTargets="InitializeSourceRootMappedPaths"
21+
Returns="@(_LocalTopLevelSourceRoot)"
22+
Condition="'$(DeterministicSourcePaths)' == 'true'">
23+
<ItemGroup>
24+
<_LocalTopLevelSourceRoot Include="@(SourceRoot)" Condition="'%(SourceRoot.NestedRoot)' == ''"/>
25+
</ItemGroup>
26+
</Target>
27+
</Project>

0 commit comments

Comments
 (0)