-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.fsx
39 lines (32 loc) · 917 Bytes
/
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
#r "paket:
nuget Fake.IO.FileSystem
nuget Fake.DotNet.MSBuild
nuget Fake.Core.Target
nuget Fake.DotNet.Cli //"
#if !FAKE
#load "./.fake/build.fsx/intellisense.fsx"
#r "netstandard" // Temp fix for https://github.com/dotnet/fsharp/issues/5216
#endif
open Fake.Core
open Fake.Core.TargetOperators
open Fake.IO
open Fake.IO.Globbing.Operators //enables !! and globbing
open Fake.DotNet
let solutionFile = "PaketAndFakeSample.sln"
let configuration = "Release"
let buildConfiguration = DotNet.Custom <| Environment.environVarOrDefault "configuration" configuration
// Targets
Target.create "Clean" (fun _ ->
!! "**/**/bin/" |> Shell.cleanDirs
["temp"] |> Shell.cleanDirs
)
Target.create "Build" (fun _ ->
solutionFile
|> DotNet.build (fun p ->
{ p with
Configuration = buildConfiguration })
)
"Clean"
==> "Build"
// start build
Target.runOrDefaultWithArguments "Build"