-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.fsx
55 lines (39 loc) · 1.37 KB
/
build.fsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#load ".fake/build.fsx/intellisense.fsx"
#load "./utils.fsx"
#load "./build-info.fsx"
#load "./daily-build.fsx"
#load "./docker.fsx"
open Fake.Core
open Fake.Core.TargetOperators
open Fake.MyFakeTools
// ----------------------
// Targets
// ----------------------
Target.useTriggerCI ()
Target.create "CI:Build" (fun p -> Utils.handleCli p.Context.Arguments Docker.ciBuild)
Target.create "CI:Test" (fun _ -> Docker.testImage())
Target.create "CI:Publish" (fun _ -> Docker.publishImage())
Target.create "update:info" (fun p ->
Utils.handleCli p.Context.Arguments BuildInfo.getDepsInfo
)
Target.create "CI" ignore
"CI:Build" ==> "CI:Test" ==> "CI:Publish" ==> "CI"
Target.create "daily:prepare" (fun _ ->
FakeVar.set "SkipVersions" List.empty<string>
DailyBuild.getAllDailyBuildInfo ()
if Utils.checkTemplateUpdate() then
FakeVar.set "SkipVersions" List.empty<string>
FakeVar.getOrFail<string list> "SkipVersions"
|> Seq.iter (Trace.tracefn "%s is up to date, will be skipped")
)
Target.create "daily:build" ( fun _ ->
DailyBuild.buildAllDailyImages ()
)
Target.create "daily:commit" ( fun _ ->
DailyBuild.commitChanges ()
)
Target.create "daily" ignore
"daily:prepare" ==> "daily:build"
==> "daily:commit" ==> "daily"
Target.create "Empty" ignore
Target.runOrDefaultWithArguments "Empty"