File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -32,9 +32,6 @@ Setup(context =>
3232 } ) ;
3333
3434 BuildParameters . Initialize ( Context ) ;
35-
36- // Cleanup build artifacts.
37- DeleteDirectory ( buildArtifactsDirectory , new DeleteDirectorySettings { Recursive = true } ) ;
3835
3936 // Executed BEFORE the first task.
4037 Information ( "Xer.Cqrs.CommandStack" ) ;
@@ -50,6 +47,13 @@ Setup(context =>
5047 Information ( "Publish to myget: {0}" , BuildParameters . Instance . ShouldPublishMyGet ) ;
5148 Information ( "Publish to nuget: {0}" , BuildParameters . Instance . ShouldPublishNuGet ) ;
5249 Information ( "///////////////////////////////////////////////////////////////////////////////" ) ;
50+
51+ if ( DirectoryExists ( buildArtifactsDirectory ) )
52+ {
53+ // Cleanup build artifacts.
54+ Information ( $ "Cleaning up { buildArtifactsDirectory } directory.") ;
55+ DeleteDirectory ( buildArtifactsDirectory , new DeleteDirectorySettings { Recursive = true } ) ;
56+ }
5357} ) ;
5458
5559Teardown ( context =>
You can’t perform that action at this time.
0 commit comments