Skip to content

Commit

Permalink
Only generate AssemblyInfo if Publish is in the FAKE target chain
Browse files Browse the repository at this point in the history
Closes #61
  • Loading branch information
Jimmy Byrd committed Mar 11, 2018
1 parent 98da27e commit 5fbae3c
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions Content/build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ Target "DotnetPack" (fun _ ->
)
)

Target "Publish" (fun _ ->
Target "Publish" (fun _ -> ()
Paket.Push(fun c ->
{ c with
PublishUrl = "https://www.nuget.org"
Expand All @@ -198,11 +198,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
Expand All @@ -215,11 +211,18 @@ 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"
Expand Down

0 comments on commit 5fbae3c

Please sign in to comment.