From c06cf9f7fd9d4f77c383170ce7f0e046f37a0528 Mon Sep 17 00:00:00 2001 From: Christoph Ruegg Date: Sat, 14 Jun 2014 12:43:41 +0200 Subject: [PATCH] Build: improve release git tag message (proper title); native provider release tags --- build.fsx | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/build.fsx b/build.fsx index d1685044..09c29467 100644 --- a/build.fsx +++ b/build.fsx @@ -410,17 +410,27 @@ Target "Api" (fun _ -> // Requires permissions; intended only for maintainers // -------------------------------------------------------------------------------------- +let pushGitTag tag = + let _, remotes, _ = Git.CommandHelper.runGitCommand "." "remote -v" + let main = remotes |> Seq.find (fun s -> s.Contains("(push)") && s.Contains("mathnet/mathnet-numerics")) + let remoteName = main.Split('\t').[0] + Git.Branches.pushTag "." remoteName tag + Target "PublishTag" (fun _ -> // inspired by Deedle/tpetricek - // create tag with release notes let tagName = "v" + packageVersion - let cmd = sprintf """tag -a %s -m "%s" """ tagName releaseNotes + let tagMessage = String.concat Environment.NewLine ["Math.NET Numerics v" + packageVersion; ""; releaseNotes ] + let cmd = sprintf """tag -a %s -m "%s" """ tagName tagMessage Git.CommandHelper.runSimpleGitCommand "." cmd |> printfn "%s" - // push tag - let _, remotes, _ = Git.CommandHelper.runGitCommand "." "remote -v" - let main = remotes |> Seq.find (fun s -> s.Contains("(push)") && s.Contains("mathnet/mathnet-numerics")) - let remoteName = main.Split('\t').[0] - Git.Branches.pushTag "." remoteName tagName) + pushGitTag tagName) + +Target "NativePublishTag" (fun _ -> + // create tag with release notes + let tagName = "native-v" + nativePackageVersion + let tagMessage = String.concat Environment.NewLine ["Math.NET Numerics Native Providers v" + nativePackageVersion; ""; nativeReleaseNotes ] + let cmd = sprintf """tag -a %s -m "%s" """ tagName tagMessage + Git.CommandHelper.runSimpleGitCommand "." cmd |> printfn "%s" + pushGitTag tagName) Target "PublishDocs" (fun _ -> let repo = "../mathnet-websites" @@ -445,6 +455,11 @@ Target "Publish" DoNothing "PublishDocs" ==> "Publish" "PublishApi" ==> "Publish" +Target "NativePublish" DoNothing +"NativePublishTag" ==> "NativePublish" +"PublishDocs" ==> "NativePublish" +"PublishApi" ==> "NativePublish" + // -------------------------------------------------------------------------------------- // Default Targets