-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.fsx
46 lines (37 loc) · 1.08 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
#I @"packages/FAKE/tools/"
#r @"FakeLib.dll"
open Fake
open Fake.Azure
open System
open System.IO
Environment.CurrentDirectory <- __SOURCE_DIRECTORY__
let solutionFile = "Demonstrator.sln"
Target "BuildSolution" (fun _ ->
solutionFile
|> MSBuildHelper.build (fun defaults ->
{ defaults with
Verbosity = Some Minimal
Targets = [ "Build" ]
Properties = [ "Configuration", "Release"
"OutputPath", Kudu.deploymentTemp ] })
|> ignore)
Target "StageWebsiteAssets" (fun _ ->
let blacklist =
[ "typings"
".fs"
".config"
".references"
"tsconfig.json" ]
let shouldInclude (file:string) =
blacklist
|> Seq.forall(not << file.Contains)
Kudu.stageFolder (Path.GetFullPath @"src\webhost") shouldInclude)
Target "StageWebJob" (fun _ ->
[ @"src\Sample.fsx" ]
|> Kudu.stageWebJob Kudu.WebJobType.Continuous "sample")
Target "Deploy" Kudu.kuduSync
"StageWebsiteAssets"
==> "BuildSolution"
==> "StageWebJob"
==> "Deploy"
RunTargetOrDefault "Deploy"