Skip to content

Commit 6af7836

Browse files
committed
switch to old build file to rebuild the project
1 parent 8652f12 commit 6af7836

File tree

2 files changed

+56
-1
lines changed

2 files changed

+56
-1
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ install:
66
- mono .paket/paket.exe install
77
script:
88
- echo "module Xake.Const [<Literal>] let internal Version = \"$VER.$TRAVIS_BUILD_NUMBER\"" > ./core/VersionInfo.fs
9-
- fsharpi build.fsx -- build test
9+
- fsharpi build-old.fsx -- build test
1010
deploy:
1111
provider: releases
1212
api_key:

build-old.fsx

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
// xake build file
2+
// boostrapping xake.core
3+
System.Environment.CurrentDirectory <- __SOURCE_DIRECTORY__
4+
5+
let file = System.IO.Path.Combine("packages", "Xake.Core.dll")
6+
if not (System.IO.File.Exists file) then
7+
printf "downloading xake.core assembly..."; System.IO.Directory.CreateDirectory("packages") |> ignore
8+
let url = "https://github.com/OlegZee/Xake/releases/download/v0.3.5/Xake.Core.dll"
9+
use wc = new System.Net.WebClient() in wc.DownloadFile(url, file + "__"); System.IO.File.Move(file + "__", file)
10+
printfn ""
11+
12+
// xake build file body
13+
#r @"packages/Xake.Core.dll"
14+
//#r @"bin/Debug/Xake.Core.dll"
15+
16+
open Xake
17+
18+
let build target = action {
19+
do! alwaysRerun()
20+
do! MSBuild {MSBuildSettings with BuildFile = "xake.sln"; Property = [("Configuration", "Release")]; Target = [target]}
21+
}
22+
23+
let systemClr cmd args =
24+
let cmd',args' = if Xake.Env.isUnix then "mono", cmd::args else cmd,args
25+
in system cmd' args'
26+
27+
do xake {XakeOptions with FileLog = "build.log"; ConLogLevel = Verbosity.Chatty } {
28+
29+
rules [
30+
"all" => action {
31+
do! need ["get-deps"]
32+
do! need ["build"]
33+
do! need ["test"]
34+
}
35+
36+
"build" => (build "Build")
37+
"clean" => (build "Clean")
38+
39+
"get-deps" => action {
40+
let! exit_code = system ".paket/paket.bootstrapper.exe" []
41+
let! exit_code = system ".paket/paket.exe" ["install"]
42+
43+
if exit_code <> 0 then
44+
failwith "Failed to install packages"
45+
}
46+
47+
"test" => action {
48+
49+
let! exit_code = systemClr "packages/NUnit.Runners/tools/nunit-console.exe" ["./bin/XakeLibTests.dll"]
50+
if exit_code <> 0 then
51+
failwith "Failed to test"
52+
}
53+
]
54+
55+
}

0 commit comments

Comments
 (0)