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 92b6498
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 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 @@ -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
Expand All @@ -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"
Expand Down

0 comments on commit 92b6498

Please sign in to comment.