Skip to content
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

Enable deterministic build #479

Merged
merged 2 commits into from
Feb 28, 2021
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
4 changes: 2 additions & 2 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ if (-Not $LastExitCode -eq 0) {
exit $LastExitCode
}

msbuild /t:Pack .\src\NLog.Extensions.Logging\ /p:targetFrameworks='"net451;net461;netstandard1.3;netstandard1.5;netstandard2.0;netcoreapp3.0;net5.0"' /p:VersionPrefix=$versionPrefix /p:VersionSuffix=$versionSuffix /p:FileVersion=$versionFile /p:ProductVersion=$versionProduct /p:Configuration=Release /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg /p:PackageOutputPath=..\..\artifacts /verbosity:minimal
msbuild /t:Pack .\src\NLog.Extensions.Logging\ /p:targetFrameworks='"net451;net461;netstandard1.3;netstandard1.5;netstandard2.0;netcoreapp3.0;net5.0"' /p:VersionPrefix=$versionPrefix /p:VersionSuffix=$versionSuffix /p:FileVersion=$versionFile /p:ProductVersion=$versionProduct /p:Configuration=Release /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg /p:PackageOutputPath=..\..\artifacts /verbosity:minimal /p:ContinuousIntegrationBuild=true
if (-Not $LastExitCode -eq 0) {
exit $LastExitCode
}

msbuild /t:Pack .\src\NLog.Extensions.Hosting\ /p:targetFrameworks='"netstandard2.0;netcoreapp3.0;net5.0"' /p:VersionPrefix=$versionPrefix /p:VersionSuffix=$versionSuffix /p:FileVersion=$versionFile /p:ProductVersion=$versionProduct /p:Configuration=Release /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg /p:PackageOutputPath=..\..\artifacts /verbosity:minimal
msbuild /t:Pack .\src\NLog.Extensions.Hosting\ /p:targetFrameworks='"netstandard2.0;netcoreapp3.0;net5.0"' /p:VersionPrefix=$versionPrefix /p:VersionSuffix=$versionSuffix /p:FileVersion=$versionFile /p:ProductVersion=$versionProduct /p:Configuration=Release /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg /p:PackageOutputPath=..\..\artifacts /verbosity:minimal /p:ContinuousIntegrationBuild=true
if (-Not $LastExitCode -eq 0) {
exit $LastExitCode
}
Expand Down
8 changes: 5 additions & 3 deletions src/NLog.Extensions.Hosting/NLog.Extensions.Hosting.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,18 @@ For ASP.NET Core, check: https://www.nuget.org/packages/NLog.Web.AspNetCore
Full changelog: https://github.com/NLog/NLog.Extensions.Logging/blob/master/CHANGELOG.MD
</PackageReleaseNotes>

<!-- SonarQube needs this -->
<!-- SonarQube needs ProjectGuid -->
<ProjectGuid>{548E65CE-0378-4812-AE00-B173F1251D3C}</ProjectGuid>
<SignAssembly>true</SignAssembly>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<AssemblyOriginatorKeyFile>..\NLog.snk</AssemblyOriginatorKeyFile>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
<LangVersion>latest</LangVersion>
<!-- EmbedUntrackedSources for deterministic build -->
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="2.1.0" />
</ItemGroup>

Expand All @@ -52,7 +54,7 @@ Full changelog: https://github.com/NLog/NLog.Extensions.Logging/blob/master/CHAN
</ItemGroup>

<ItemGroup>
<None Include="N.png" Pack="true" PackagePath=""/>
<None Include="N.png" Pack="true" PackagePath="" />
</ItemGroup>
<Target Name="DownloadMissingContent" BeforeTargets="GenerateNuspec">
<DownloadFile SourceUrl="https://nlog-project.org/N.png" DestinationFolder="$(MSBuildThisFileDirectory)" />
Expand Down
14 changes: 8 additions & 6 deletions src/NLog.Extensions.Logging/NLog.Extensions.Logging.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<DebugType Condition=" '$(Configuration)' == 'Debug' ">Full</DebugType>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>

<Product>NLog.Extensions.Logging v$(ProductVersion)</Product>
<InformationalVersion>$(ProductVersion)</InformationalVersion>

<Authors>Microsoft;Julian Verdurmen</Authors>
<Company>NLog</Company>
<Description>NLog LoggerProvider for Microsoft.Extensions.Logging for logging in .NET Standard libraries and .NET Core applications.
Expand All @@ -34,18 +34,20 @@ Full changelog: https://github.com/NLog/NLog.Extensions.Logging/blob/master/CHAN
<PackageIcon>N.png</PackageIcon>
<RepositoryUrl>https://github.com/NLog/NLog.Extensions.Logging.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>

<ProjectGuid>{6A236D76-C9D9-4B1D-8DDE-F6978D110288}</ProjectGuid> <!--Project guid for Sonar-->
<!-- SonarQube needs ProjectGuid -->
<ProjectGuid>{6A236D76-C9D9-4B1D-8DDE-F6978D110288}</ProjectGuid>
<SignAssembly>true</SignAssembly>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<AssemblyOriginatorKeyFile>..\NLog.snk</AssemblyOriginatorKeyFile>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
<!-- EmbedUntrackedSources for deterministic build -->
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>

<Target Name="DownloadMissingContent" BeforeTargets="GenerateNuspec">
<DownloadFile SourceUrl="https://nlog-project.org/N.png" DestinationFolder="$(MSBuildThisFileDirectory)" />
</Target>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net461' ">
<Title>NLog.Extensions.Logging for .NET Framework 4.6.1</Title>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
Expand All @@ -68,7 +70,7 @@ Full changelog: https://github.com/NLog/NLog.Extensions.Logging/blob/master/CHAN
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<Title>NLog.Extensions.Logging for .NET Standard 2.0</Title>
<DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
</PropertyGroup>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.0' ">
<Title>NLog.Extensions.Logging for .NET Core 3</Title>
<DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
Expand Down