forked from chuongmep/CadPythonShell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBuild.Clean.cs
More file actions
21 lines (19 loc) · 719 Bytes
/
Build.Clean.cs
File metadata and controls
21 lines (19 loc) · 719 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using Nuke.Common;
using Nuke.Common.IO;
using Nuke.Common.Utilities.Collections;
using static Nuke.Common.IO.FileSystemTasks;
internal partial class Build
{
private Target Cleaning => _ => _
.Executes(() =>
{
EnsureCleanDirectory(ArtifactsDirectory);
if (IsServerBuild) return;
foreach (var projectName in Projects)
{
var project = BuilderExtensions.GetProject(Solution, projectName);
var binDirectory = (AbsolutePath)new DirectoryInfo(project.GetBinDirectory()).FullName;
binDirectory.GlobDirectories($"{AddInBinPrefix}*", "Release*").ForEach(DeleteDirectory);
}
});
}