-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.fsx
51 lines (38 loc) · 1.13 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
#load ".fake/build.fsx/intellisense.fsx"
open Fake.Core
open Fake.Core.TargetOperators
open Fake.DotNet
open Fake.IO
open System.Threading
let apiPath = "./src/Api/" |> Path.getFullName
let apiProjectPath = Path.combine apiPath "Api.fsproj"
let identityServerPath = "./src/IdentityServer/" |> Path.getFullName
let identityServerProjectPath = Path.combine identityServerPath "IdentityServer.csproj"
Target.create "Clean" ignore
Target.create "Restore" (fun _ ->
DotNet.restore id apiProjectPath
DotNet.restore id identityServerProjectPath
)
Target.create "Build" (fun _ ->
DotNet.build id apiProjectPath
DotNet.build id identityServerProjectPath
)
Target.create "Run" (fun _ ->
let apiServer = async {
DotNet.exec (fun p -> { p with WorkingDirectory = apiPath } ) "watch" "run" |> ignore
}
let identityServer = async {
DotNet.exec (fun p -> { p with WorkingDirectory = identityServerPath } ) "watch" "run" |> ignore
}
[ apiServer; identityServer]
|> Async.Parallel
|> Async.RunSynchronously
|> ignore
)
"Clean"
==> "Restore"
==> "Build"
"Clean"
==> "Restore"
==> "Run"
Target.runOrDefault "Build"