Skip to content

Commit

Permalink
Better dependency order in FAKE
Browse files Browse the repository at this point in the history
  • Loading branch information
vbfox committed Sep 9, 2018
1 parent e9acbba commit 2458f16
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/BlackFox.MasterOfFoo.Build/Tasks.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]

Expand Down

0 comments on commit 2458f16

Please sign in to comment.