Browse Source

Build: publish docs and api reference; buildn.sh for bash with .net (instead of mono)

pull/222/head
Christoph Ruegg 12 years ago
parent
commit
503e297afb
  1. 5
      README.md
  2. 30
      build.fsx
  3. 5
      buildn.sh
  4. 5
      docs/content/index.fsx

5
README.md

@ -58,8 +58,9 @@ If you do not want to use the official binaries, or if you like to modify, debug
### How to build with FAKE
build.cmd # normal build (.Net 4.0), run unit tests
./build.sh # normal build (.Net 4.0), run unit tests - on Linux or Mac
build.cmd # normal build (.Net 4.0), run unit tests
./build.sh # normal build (.Net 4.0), run unit tests - on Linux or Mac
./buildn.sh # normal build (.Net 4.0), run unit tests - bash on Windows (.Net instead of mono)
build.cmd Build # normal build (.Net 4.0)
build.cmd Build incremental # normal build, incremental (.Net 4.0)

30
build.fsx

@ -9,7 +9,6 @@ open Fake
open Fake.DocuHelper
open Fake.AssemblyInfoFile
open Fake.ReleaseNotesHelper
open Fake.Git
open System
Environment.CurrentDirectory <- __SOURCE_DIRECTORY__
@ -287,12 +286,35 @@ Target "PublishTag" (fun _ ->
// create tag with release notes
let tagName = "v" + packageVersion
let cmd = sprintf """tag -a %s -m "%s" """ tagName releaseNotes
CommandHelper.runSimpleGitCommand "." cmd |> printfn "%s"
Git.CommandHelper.runSimpleGitCommand "." cmd |> printfn "%s"
// push tag
let _, remotes, _ = CommandHelper.runGitCommand "." "remote -v"
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]
Branches.pushTag "." remoteName tagName)
Git.Branches.pushTag "." remoteName tagName)
Target "PublishDocs" (fun _ ->
let repo = "../mathnet-websites"
Git.Branches.pull repo "origin" "master"
CleanDir "../mathnet-websites/numerics/docs"
CopyRecursive "out/docs" "../mathnet-websites/numerics/docs" true |> printfn "%A"
Git.Staging.StageAll repo
Git.Commit.Commit repo (sprintf "Numerics: %s docs update" packageVersion)
Git.Branches.pushBranch repo "origin" "master")
Target "PublishApi" (fun _ ->
let repo = "../mathnet-websites"
Git.Branches.pull repo "origin" "master"
CleanDir "../mathnet-websites/api-numerics"
CopyRecursive "out/api" "../mathnet-websites/api-numerics" true |> printfn "%A"
Git.Staging.StageAll repo
Git.Commit.Commit repo (sprintf "Numerics: %s api update" packageVersion)
Git.Branches.pushBranch repo "origin" "master")
Target "Publish" DoNothing
"PublishTag" ==> "Publish"
"PublishDocs" ==> "Publish"
"PublishApi" ==> "Publish"
// RUN

5
buildn.sh

@ -0,0 +1,5 @@
#!/bin/bash
if [ ! -f packages/FAKE/tools/FAKE.exe ]; then
.nuget/NuGet.exe install FAKE -OutputDirectory packages -ExcludeVersion
fi
packages/FAKE/tools/FAKE.exe build.fsx $@

5
docs/content/index.fsx

@ -201,8 +201,9 @@ If you do not want to use the official binaries, or if you like to modify, debug
### How to build with FAKE
[lang=sh]
build.cmd # normal build (.Net 4.0), run unit tests
./build.sh # normal build (.Net 4.0), run unit tests - on Linux or Mac
build.cmd # normal build (.Net 4.0), run unit tests
./build.sh # normal build (.Net 4.0), run unit tests - on Linux or Mac
./buildn.sh # normal build (.Net 4.0), run unit tests - bash on Windows (.Net instead of mono)
build.cmd Build # normal build (.Net 4.0)
build.cmd Build incremental # normal build, incremental (.Net 4.0)

Loading…
Cancel
Save