Skip to content

Commit

Permalink
Include symbols and deterministic build
Browse files Browse the repository at this point in the history
  • Loading branch information
lahma committed Feb 21, 2024
1 parent 19d7875 commit a74ddae
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ TestResults
*.orig
Help/*
release/*
/_ReSharper.*
_ReSharper.*
*.pidb
*.userprefs
packages
Expand Down
4 changes: 4 additions & 0 deletions YamlDotNet/YamlDotNet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@

<NetStandard>false</NetStandard>
<RealTargetFramework>$(TargetFramework)</RealTargetFramework>

<DebugSymbols>true</DebugSymbols>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' != 'netcoreapp3.1'">
Expand Down
8 changes: 8 additions & 0 deletions YamlDotNet/YamlDotNet.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<icon>images/yamldotnet.png</icon>
<repository type="git" url="https://github.com/aaubry/YamlDotNet.git" />
<tags>yaml parser development library serialization</tags>
<readme>README.md</readme>
<dependencies>
<group targetFramework=".NETFramework4.7" />
<group targetFramework=".NETStandard2.0" />
Expand All @@ -24,23 +25,30 @@
</metadata>
<files>
<file src="bin/Release/net47/YamlDotNet.dll" target="lib/net47" />
<file src="bin/Release/net47/YamlDotNet.pdb" target="lib/net47" />
<file src="bin/Release/net47/YamlDotNet.xml" target="lib/net47" />

<file src="bin/Release/net60/YamlDotNet.dll" target="lib/net6.0" />
<file src="bin/Release/net60/YamlDotNet.pdb" target="lib/net6.0" />
<file src="bin/Release/net60/YamlDotNet.xml" target="lib/net6.0" />

<file src="bin/Release/net70/YamlDotNet.dll" target="lib/net7.0" />
<file src="bin/Release/net70/YamlDotNet.pdb" target="lib/net7.0" />
<file src="bin/Release/net70/YamlDotNet.xml" target="lib/net7.0" />

<file src="bin/Release/net80/YamlDotNet.dll" target="lib/net8.0" />
<file src="bin/Release/net80/YamlDotNet.pdb" target="lib/net8.0" />
<file src="bin/Release/net80/YamlDotNet.xml" target="lib/net8.0" />

<file src="bin/Release/netstandard2.0/YamlDotNet.dll" target="lib/netstandard2.0" />
<file src="bin/Release/netstandard2.0/YamlDotNet.pdb" target="lib/netstandard2.0" />
<file src="bin/Release/netstandard2.0/YamlDotNet.xml" target="lib/netstandard2.0" />

<file src="bin/Release/netstandard2.1/YamlDotNet.dll" target="lib/netstandard2.1" />
<file src="bin/Release/netstandard2.1/YamlDotNet.pdb" target="lib/netstandard2.1" />
<file src="bin/Release/netstandard2.1/YamlDotNet.xml" target="lib/netstandard2.1" />

<file src="../README.md" target="" />
<file src="../LICENSE.txt" target="" />
<file src="../yamldotnet.png" target="images/" />
</files>
Expand Down
6 changes: 3 additions & 3 deletions tools/build/BuildDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public static Task<MetadataSet> SetMetadata(GitVersion version)
public static Task<SuccessfulBuild> Build(Options options, MetadataSet _)
{
var verbosity = options.Verbose ? "detailed" : "minimal";
Run("dotnet", $"build YamlDotNet.sln --configuration Release --verbosity {verbosity}", BasePath);
Run("dotnet", $"build YamlDotNet.sln --configuration Release --verbosity {verbosity} -p:ContinuousIntegrationBuild=true", BasePath);

return Task.FromResult(new SuccessfulBuild());
}
Expand All @@ -143,14 +143,14 @@ public static Task<List<NuGetPackage>> Pack(Options options, GitVersion version,
var result = new List<NuGetPackage>();
var verbosity = options.Verbose ? "detailed" : "minimal";
var buildDir = Path.Combine(BasePath, "YamlDotNet");
Run("nuget", $"pack YamlDotNet.nuspec -Version {version.NuGetVersion} -OutputDirectory bin", buildDir);
Run("nuget", $"pack YamlDotNet.nuspec -Version {version.NuGetVersion} -OutputDirectory bin -Symbols -SymbolPackageFormat snupkg", buildDir);
var packagePath = Path.Combine(buildDir, "bin", $"YamlDotNet.{version.NuGetVersion}.nupkg");
result.Add(new NuGetPackage(packagePath, "YamlDotNet"));

if (PushSerializer)
{
buildDir = Path.Combine(BasePath, "YamlDotNet.Analyzers.StaticGenerator");
Run("nuget", $"pack YamlDotNet.Analyzers.StaticGenerator.nuspec -Version {version.NuGetVersion} -OutputDirectory bin", buildDir);
Run("nuget", $"pack YamlDotNet.Analyzers.StaticGenerator.nuspec -Version {version.NuGetVersion} -OutputDirectory bin -Symbols -SymbolPackageFormat snupkg", buildDir);
packagePath = Path.Combine(buildDir, "bin", $"YamlDotNet.Analyzers.StaticGenerator.{version.NuGetVersion}.nupkg");
result.Add(new NuGetPackage(packagePath, "YamlDotNet.Analyzers.StaticGenerator"));
}
Expand Down

0 comments on commit a74ddae

Please sign in to comment.