Skip to content
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
17 changes: 0 additions & 17 deletions Build/Tasks/BuildToTempFolder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,5 @@ namespace DotNetNuke.Build.Tasks
[IsDependentOn(typeof(OtherPackages))]
public sealed class BuildToTempFolder : FrostingTask<Context>
{
private static readonly string[] SampleModuleArtifactsPattern = ["SampleModules/*.zip",];

/// <inheritdoc />
public override void Run(Context context)
{
if (context.Settings.CopySampleProjects)
{
context.Information("Copying Sample Projects to Temp Folder");
var files = context.GetFilesByPatterns(context.ArtifactsFolder, SampleModuleArtifactsPattern);
foreach (var file in files)
{
var destination = context.File(System.IO.Path.Combine(context.WebsiteFolder, "Install", "Module", file.GetFilename().ToString()));
context.CopyFile(file, destination);
context.Information($" Copied {file.GetFilename()} to {destination}");
}
}
}
}
}
19 changes: 16 additions & 3 deletions Build/Tasks/PreparePackaging.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
// See the LICENSE file in the project root for more information
namespace DotNetNuke.Build.Tasks
{
using System;
using System.Linq;

using Cake.Common.Diagnostics;
using Cake.Common.IO;
using Cake.Frosting;
using Cake.Json;
using Dnn.CakeUtils;

/// <summary>A cake task to prepare for packaging (by building the platform and copying files).</summary>
[IsDependentOn(typeof(CopyWebsite))]
Expand All @@ -17,6 +16,8 @@ namespace DotNetNuke.Build.Tasks
[IsDependentOn(typeof(CopyWebsiteBinFolder))]
public sealed class PreparePackaging : FrostingTask<Context>
{
private static readonly string[] SampleModuleArtifactsPattern = ["SampleModules/*.zip",];

/// <inheritdoc />
public override void Run(Context context)
{
Expand All @@ -32,6 +33,18 @@ public override void Run(Context context)
context.CopyFile(
"./DNN Platform/Library/bin/PetaPoco.dll",
context.WebsiteFolder + "bin/PetaPoco.dll");

if (context.Settings.CopySampleProjects)
{
context.Information("Copying Sample Projects to Temp Folder");
var files = context.GetFilesByPatterns(context.ArtifactsFolder, SampleModuleArtifactsPattern);
foreach (var file in files)
{
var destination = context.File(System.IO.Path.Combine(context.WebsiteFolder, "Install", "Module", file.GetFilename().ToString()));
context.CopyFile(file, destination);
context.Information($" Copied {file.GetFilename()} to {destination}");
}
}
}
}
}