From 2458f16864d125960e93b42d9da31c09b34ccf7c Mon Sep 17 00:00:00 2001 From: Julien Roncaglia Date: Sun, 9 Sep 2018 14:10:51 +0200 Subject: [PATCH] Better dependency order in FAKE --- src/BlackFox.MasterOfFoo.Build/Tasks.fs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/BlackFox.MasterOfFoo.Build/Tasks.fs b/src/BlackFox.MasterOfFoo.Build/Tasks.fs index 26e9c62..37f3e7e 100644 --- a/src/BlackFox.MasterOfFoo.Build/Tasks.fs +++ b/src/BlackFox.MasterOfFoo.Build/Tasks.fs @@ -130,7 +130,18 @@ let createAndGetDefault () = Trace.publish ImportData.BuildArtifact zipFile } - let gitHubRelease = BuildTask.create "GitHubRelease" [zip] { + let gitRelease = BuildTask.create "GitRelease" [nuget.IfNeeded] { + let remote = + Git.CommandHelper.getGitResult "" "remote -v" + |> Seq.filter (fun (s: string) -> s.EndsWith("(push)")) + |> Seq.tryFind (fun (s: string) -> s.Contains(gitOwner + "/" + gitName)) + |> function None -> gitHome + "/" + gitName | Some (s: string) -> s.Split().[0] + + Git.Branches.tag "" release.NugetVersion + Git.Branches.pushTag "" remote release.NugetVersion + } + + let gitHubRelease = BuildTask.create "GitHubRelease" [zip; gitRelease.IfNeeded] { let user = match Environment.environVarOrNone "github-user" with | Some s -> s @@ -153,17 +164,6 @@ let createAndGetDefault () = |> Async.RunSynchronously } - let gitRelease = BuildTask.create "GitRelease" [] { - let remote = - Git.CommandHelper.getGitResult "" "remote -v" - |> Seq.filter (fun (s: string) -> s.EndsWith("(push)")) - |> Seq.tryFind (fun (s: string) -> s.Contains(gitOwner + "/" + gitName)) - |> function None -> gitHome + "/" + gitName | Some (s: string) -> s.Split().[0] - - Git.Branches.tag "" release.NugetVersion - Git.Branches.pushTag "" remote release.NugetVersion - } - let _releaseTask = BuildTask.createEmpty "Release" [clean; gitRelease; gitHubRelease; publishNuget] let _ciTask = BuildTask.createEmpty "CI" [clean; runTests; zip; nuget]