@@ -41,17 +41,18 @@ let run cmd dir args =
41
41
failwithf " Error while running '%s ' with args: %s " cmd args
42
42
43
43
let platformTool tool =
44
- ProcessUtils.tryFindFileOnPath tool
45
- |> function Some t -> t | _ -> failwithf " %s not found" tool
44
+ lazy
45
+ ProcessUtils.tryFindFileOnPath tool
46
+ |> function Some t -> t | _ -> failwithf " %s not found" tool
46
47
47
48
let dotnetExec cmd args =
48
49
let result = DotNet.exec id cmd args
49
50
if not result.OK then
50
51
failwithf " Error while running 'dotnet %s %s '" cmd args
51
52
52
53
let opamTool = platformTool " opam"
53
- let opam args = run opamTool " ./" args
54
- let dune args = run opamTool " ./" ( sprintf " exec -- dune %s " args)
54
+ let opam args = run opamTool.Value " ./" args
55
+ let dune args = run opamTool.Value " ./" ( sprintf " exec -- dune %s " args)
55
56
56
57
// Build targets
57
58
@@ -89,27 +90,24 @@ Target.create "Watch" <| fun _ ->
89
90
dotnetExec " fable" $" watch {srcDir} --sourceMaps --define DEBUG --run webpack -w --mode=development"
90
91
91
92
Target.create " Test" ignore
92
- Target.create " TestOnly" ignore
93
- Target.create " TestComplete" ignore
94
93
95
94
" Clean"
96
- = => " YarnInstall"
95
+ ? => " YarnInstall"
97
96
==> " Restore"
98
97
==> " Prepare"
99
- ==> " Build"
100
98
101
- " TestOnly"
102
- ==> " TestComplete"
103
- ==> " Test"
99
+ " Prepare"
100
+ ==> " BuildForTest"
104
101
105
102
" Prepare"
106
- ?=> " BuildForTest"
107
- ?=> " TestComplete"
108
- ?=> " BuildForPublish"
103
+ ==> " BuildForPublish"
109
104
==> " Build"
110
105
111
106
" Prepare"
112
- ?=> " Watch"
107
+ ==> " Test"
108
+
109
+ " Prepare"
110
+ ==> " Watch"
113
111
114
112
// Test targets
115
113
@@ -226,7 +224,7 @@ Target.create "TestJsoo" ignore
226
224
==> " TestJsooGenerateBindings"
227
225
==> " TestJsooBuild"
228
226
==> " TestJsoo"
229
- ==> " TestOnly "
227
+ ==> " Test "
230
228
231
229
Target.create " TestResClean" <| fun _ -> Test.Res.clean ()
232
230
Target.create " TestResGenerateBindings" <| fun _ -> Test.Res.generateBindings ()
@@ -238,7 +236,7 @@ Target.create "TestRes" ignore
238
236
==> " TestResGenerateBindings"
239
237
==> " TestResBuild"
240
238
==> " TestRes"
241
- ==> " TestOnly "
239
+ ==> " Test "
242
240
243
241
// Publish targets
244
242
@@ -287,7 +285,6 @@ module Publish =
287
285
inDirectory targetDir <| fun () -> dune " build"
288
286
289
287
Target.create " Publish" <| fun _ -> ()
290
- Target.create " PublishOnly" <| fun _ -> ()
291
288
292
289
Target.create " PublishNpm" <| fun _ ->
293
290
Publish.Npm.updateVersion ()
@@ -300,7 +297,6 @@ Target.create "PublishJsoo" <| fun _ ->
300
297
" BuildForPublish"
301
298
==> " PublishNpm"
302
299
==> " PublishJsoo"
303
- ==> " PublishOnly"
304
300
==> " Publish"
305
301
306
302
" TestJsoo" ==> " PublishJsoo"
@@ -309,6 +305,7 @@ Target.create "PublishJsoo" <| fun _ ->
309
305
310
306
Target.create " All" ignore
311
307
308
+ " Prepare" ==> " All"
312
309
" Build"
313
310
==> " Test"
314
311
==> " Publish"
0 commit comments