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

Produce snupkg format for NuGet #4608

Merged
merged 2 commits into from
Apr 14, 2021
Merged
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
18 changes: 13 additions & 5 deletions Build/Tasks/CreateNugetPackages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ namespace DotNetNuke.Build.Tasks
using Cake.Common.IO;
using Cake.Common.Tools.NuGet;
using Cake.Common.Tools.NuGet.Pack;
using Cake.Core;
using Cake.Frosting;

using DotNetNuke.Build;

/// <summary>A cake task to create the platform's NuGet packages.</summary>
Expand All @@ -24,6 +24,7 @@ public override void Run(Context context)
{
// look for solutions and start building them
var nuspecFiles = context.GetFiles("./Build/Tools/NuGet/*.nuspec");
var noSymbolsNuspecFiles = context.GetFiles("./Build/Tools/NuGet/DotNetNuke.WebApi.nuspec");

context.Information("Found {0} nuspec files.", nuspecFiles.Count);

Expand All @@ -35,15 +36,22 @@ public override void Run(Context context)
IncludeReferencedProjects = true,
Symbols = true,
Properties = new Dictionary<string, string> { { "Configuration", "Release" } },
ArgumentCustomization = args => args.Append("-SymbolPackageFormat snupkg"),
};

// loop through each nuspec file and create the package
nuspecFiles -= noSymbolsNuspecFiles;
foreach (var spec in nuspecFiles)
{
var specPath = spec.ToString();
context.Information("Starting to pack: {0}", spec);
context.NuGetPack(spec.FullPath, nuGetPackSettings);
}

context.Information("Starting to pack: {0}", specPath);
context.NuGetPack(specPath, nuGetPackSettings);
nuGetPackSettings.Symbols = false;
nuGetPackSettings.ArgumentCustomization = null;
foreach (var spec in noSymbolsNuspecFiles)
{
context.Information("Starting to pack: {0}", spec);
context.NuGetPack(spec.FullPath, nuGetPackSettings);
}
}
}
Expand Down