Skip to content

Commit

Permalink
Don't clean publish directory on startup
Browse files Browse the repository at this point in the history
Only clean on Cleanup
  • Loading branch information
jordansjones committed Aug 3, 2018
1 parent 24fe288 commit 220bcff
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,22 @@ var semVersion = isReleaseBuild ? version : (version + string.Concat("-build-",
Setup(context =>
{
// Executed BEFORE the first task.
Information("Running tasks...");
Information("Building {0} [{1}] ({2} - {3}).", solution.GetFilename(), configuration, version, semVersion);

if (!DirectoryExists(testResultsDir))
{
CreateDirectory(testResultsDir);
}

if (DirectoryExists(packagingRoot))
if (!DirectoryExists(packagingRoot))
{
CleanDirectory(packagingRoot);
CreateDirectory(packagingRoot);
}
});

Teardown(context =>
{
// Executed AFTER the last task.
Information("Finished running tasks.");
Information("Built {0} [{1}] ({2} - {3}).", solution.GetFilename(), configuration, version, semVersion);
});

///////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -191,6 +190,4 @@ Task("Default")
// EXECUTION
///////////////////////////////////////////////////////////////////////////////

Information("Building {0} [{1}] ({2} - {3}).", solution.GetFilename(), configuration, version, semVersion);

RunTarget(target);

0 comments on commit 220bcff

Please sign in to comment.