Skip to content

Commit

Permalink
Enable "Clean" build target
Browse files Browse the repository at this point in the history
This removes files created during the build process so we can have a clean build.
  • Loading branch information
quintusm committed Aug 13, 2021
1 parent 2efd54d commit a6c5a90
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 17 deletions.
3 changes: 1 addition & 2 deletions .paket/Paket.Restore.targets
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,7 @@
NuspecProperties="$(NuspecProperties)"
PackageLicenseFile="$(PackageLicenseFile)"
PackageLicenseExpression="$(PackageLicenseExpression)"
PackageLicenseExpressionVersion="$(PackageLicenseExpressionVersion)"
NoDefaultExcludes="$(NoDefaultExcludes)" />
PackageLicenseExpressionVersion="$(PackageLicenseExpressionVersion)" />

<PackTask Condition="$(UseMSBuild15_9_Pack)"
PackItem="$(PackProjectInputFile)"
Expand Down
45 changes: 30 additions & 15 deletions build.fsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
// --------------------------------------------------------------------------------------
// FAKE build script
// --------------------------------------------------------------------------------------

#r "paket: groupref Build //"
#load ".fake/build.fsx/intellisense.fsx"

#if !Fake
#r "netstandard"
#endif

//open Fake
open Fake.Core
open Fake.Core.TargetOperators
open Fake.IO
open Fake.IO.FileSystemOperators
open Fake.IO.Globbing.Operators

//open Fake.Git
//open Fake.Testing.NUnit3
//open Fake.AssemblyInfoFile
//open Fake.ReleaseNotesHelper
//open Fake.UserInputHelper
//open System
open System
//open System.IO

Target.initEnvironment ()



//// --------------------------------------------------------------------------------------
//// START TODO: Provide project-specific details below
//// --------------------------------------------------------------------------------------
Expand Down Expand Up @@ -128,12 +133,22 @@
// |> Seq.iter (fun (fromDir, toDir) -> CopyDir toDir fromDir (fun _ -> true))
//)

//// --------------------------------------------------------------------------------------
//// Clean build results
// --------------------------------------------------------------------------------------
// Clean build results
Target.create "Clean" (fun _ ->
Trace.log "--Cleaning various directories"
!! "bin"
++ "temp"
++ "tmp"
++ "test/bin"
++ "test/obj"
++ "src/**/bin"
++ "src/**/obj"
|> Shell.cleanDirs)




//Target "Clean" (fun _ ->
// CleanDirs ["bin"; "temp"]
//)

//Target "CleanDocs" (fun _ ->
// CleanDirs ["docs/output"]
Expand Down Expand Up @@ -342,16 +357,16 @@
//// --------------------------------------------------------------------------------------
//// Run all targets by default. Invoke 'build <Target>' to override

//Target "All" DoNothing
Target.create "All" ignore

//"Clean"
"Clean"
// ==> "AssemblyInfo"
// ==> "Build"
// ==> "CopyBinaries"
// ==> "RunTests"
// ==> "GenerateReferenceDocs"
// ==> "GenerateDocs"
// ==> "All"
==> "All"
// =?> ("ReleaseDocs",isLocalBuild)

//"All"
Expand All @@ -370,4 +385,4 @@
// ==> "PublishNuget"
// ==> "Release"

//RunTargetOrDefault "All"
Target.runOrDefaultWithArguments "All"

0 comments on commit a6c5a90

Please sign in to comment.