From 92b6498fe0dff6ecc47af26cf1e87d7a12af37fa Mon Sep 17 00:00:00 2001 From: Jimmy Byrd Date: Sun, 11 Mar 2018 16:32:46 -0400 Subject: [PATCH] Only generate AssemblyInfo if Publish is in the FAKE target chain Closes #61 --- Content/build.fsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Content/build.fsx b/Content/build.fsx index 8cc23f53..86532c04 100644 --- a/Content/build.fsx +++ b/Content/build.fsx @@ -189,7 +189,7 @@ Target "DotnetPack" (fun _ -> ) ) -Target "Publish" (fun _ -> +Target "Publish" (fun _ -> () Paket.Push(fun c -> { c with PublishUrl = "https://www.nuget.org" @@ -201,8 +201,7 @@ Target "Publish" (fun _ -> -Target "Release" (fun _ -> - +Target "Release" (fun _ -> () if Git.Information.getBranchName "" <> "master" then failwith "Not on master" let releaseNotesGitCommitFormat = ("",release.Notes |> Seq.map(sprintf "* %s\n")) |> String.Join @@ -215,11 +214,19 @@ Target "Release" (fun _ -> Branches.pushTag "" "origin" release.NugetVersion ) +// Only call Clean if DotnetPack was in the call chain +// Ensure Clean is called before DotnetRestore "Clean" ?=> "DotnetRestore" "Clean" ==> "DotnetPack" + +// Only call AssemblyInfo if Publish was in the call chain +// Ensure AssemblyInfo is called after DotnetRestore and before DotnetBuild +"DotnetRestore" ?=> "AssemblyInfo" +"AssemblyInfo" ?=> "DotnetBuild" +"AssemblyInfo" ==> "Publish" + "DotnetRestore" - ==> "AssemblyInfo" ==> "DotnetBuild" ==> "DotnetTest" ==> "DotnetPack"