-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathCore.fsx
75 lines (70 loc) · 4.04 KB
/
Core.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#r @"../../../packages/FAKE/tools/FakeLib.dll"
#load "./Utils.fsx"
#load "./Packaging.fsx"
#load "./Versioning.fsx"
#load "./Solution.fsx"
#load "./Test.fsx"
#load "./Specflow.fsx"
#load "./Grunt.fsx"
#load "./Octopus.fsx"
#load "./Docker.fsx"
open System.IO
open Fake
let config =
Map.ofList [
"build:configuration", environVarOrDefault "configuration" "Release"
"build:solution", environVar "solution"
"utils:pullrequestbranchspec", environVarOrDefault "pullrequestbranchspec" "pull/.*"
"grunt:environment", environVarOrDefault "gruntenvironment" "dev"
"grunt:verbose", environVarOrDefault "gruntverbose" "false"
"packaging:output", environVarOrDefault "output" (sprintf "%s\output" (Path.GetFullPath(".")))
"packaging:deployoutput", environVarOrDefault "deployoutput" (sprintf "%s\deploy" (Path.GetFullPath(".")))
"packaging:outputsubdirs", environVarOrDefault "outputsubdirs" "false"
"packaging:updateid", environVarOrDefault "updateid" ""
"packaging:pushto", environVarOrDefault "pushto" ""
"packaging:pushdir", environVarOrDefault "pushdir" ""
"packaging:pushurl", environVarOrDefault "pushurl" ""
"packaging:pushendpoint", environVarOrDefault "pushendpoint" "/api/v2/package"
"packaging:apikey", environVarOrDefault "apikey" ""
"packaging:deploypushto", environVarOrDefault "deploypushto" ""
"packaging:deploypushdir", environVarOrDefault "deploypushdir" ""
"packaging:deploypushurl", environVarOrDefault "deploypushurl" ""
"packaging:deployapikey", environVarOrDefault "deployapikey" ""
"packaging:deploynuspecsearch", environVarOrDefault "deploynuspecsearch" ""
"packaging:packages", environVarOrDefault "packages" ""
"versioning:build", environVarOrDefault "build_number" "0"
"versioning:branch", match environVar "teamcity_build_branch" with
| "<default>" -> environVar "vcsroot_branch"
| _ -> environVar "teamcity_build_branch"
"vs:version", environVarOrDefault "vs_version" "11.0"
]
// Target definitions
Target "Default" <| DoNothing
Target "Packaging:Package" <| Packaging.package config
// Target "Packaging:PackageDeploy" <| Packaging.packageDeploy config
// Target "Packaging:Update" <| Packaging.update config
Target "Packaging:Push" <| Packaging.push config
// Target "Packaging:Constrain" <| Packaging.constrain config
// Target "Packaging:PushDeploy" <| Packaging.pushDeploy config
Target "Solution:Build" <| Solution.build config
Target "Solution:Restore" <| Solution.restore config
Target "Solution:Clean" <| Solution.clean config
Target "Versioning:Update" <| Versioning.update config
Target "Versioning:UpdateDeployNuspec" <| Versioning.updateDeploy config
Target "Grunt:Install" <| Grunt.install config
Target "Grunt:Run" <| Grunt.run config
Target "Grunt:Karma" <| Grunt.karma config
Target "Grunt:Protractor" <| Grunt.protractor config
Target "Test:Run" <| Test.run config
Target "SpecFlow:Run" <| Specflow.run config
Target "Docker:Package" <| Docker.dockerize config
// Build order
"Solution:Clean"
==> "Versioning:Update"
==> "Solution:Build"
==> "SpecFlow:Run"
==> "Packaging:Package"
==> "Test:Run"
=?> ("Packaging:Push", not isLocalBuild)
==> "Default"
RunParameterTargetOrDefault "target" "Default"