Skip to content

Commit

Permalink
enable deterministic builds
Browse files Browse the repository at this point in the history
  • Loading branch information
mgravell committed Apr 5, 2020
1 parent 77f50a5 commit e3e4607
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,18 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Optimize>true</Optimize>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<Deterministic>true</Deterministic>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>
<ItemGroup Condition="'$(Configuration)' == 'Release' and '$(SourceRoot)'==''">
<SourceRoot Include="$(MSBuildThisFileDirectory)/"/>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.0.50" PrivateAssets="All" IncludeAssets="runtime;build;native;contentfiles;analyzers" />
<PackageReference Include="Nerdbank.GitVersioning" Version="3.1.74" PrivateAssets="all" />
</ItemGroup>
</Project>
9 changes: 9 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project>
<!-- workaround for deterministic builds; see https://github.com/clairernovotny/DeterministicBuilds -->
<PropertyGroup>
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
</PropertyGroup>
<ItemGroup>
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/>
</ItemGroup>
</Project>
4 changes: 4 additions & 0 deletions examples/pb-net-grpc/Client_FS/Client_FS.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@
<PackageReference Include="TaskBuilder.fs" Version="2.1.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="FSharp.Core" Version="4.7.1" />
</ItemGroup>

</Project>
4 changes: 4 additions & 0 deletions examples/pb-net-grpc/Server_FS/Server_FS.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@
<PackageReference Condition="'$(ExampleRefs)'=='nuget'" Include="protobuf-net.Grpc.AspNetCore" Version="$(PBGRPCLibVersion)" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="FSharp.Core" Version="4.7.1" />
</ItemGroup>

</Project>
4 changes: 4 additions & 0 deletions examples/pb-net-grpc/Shared_FS/Shared_FS.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@
<PackageReference Include="System.ServiceModel.Primitives" Version="4.7.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="FSharp.Core" Version="4.7.1" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions protobuf-net.Grpc.sln
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "config", "config", "{8D5FDB6F-6111-4604-8EDF-6A59F8B12D7E}"
ProjectSection(SolutionItems) = preProject
Directory.build.props = Directory.build.props
Directory.Build.targets = Directory.Build.targets
global.json = global.json
readme.md = readme.md
version.json = version.json
Expand Down

0 comments on commit e3e4607

Please sign in to comment.