This repository has been archived by the owner on Feb 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
/
build.fsx
56 lines (47 loc) · 1.57 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
52
53
54
55
56
#r "packages/build/FAKE/tools/FakeLib.dll"
#r "System.IO.Compression.FileSystem"
#load "paket-files/build/fable-compiler/fake-helpers/Fable.FakeHelpers.fs"
open Fake
open System.IO
open Fable.FakeHelpers
let packages = [
// Node is automatically published by CI
// "Node/Fable.Import.Node"
"Browser/Fable.Import.Browser"
"Express/Fable.Import.Express"
"Pg/Fable.Import.Pg"
"SocketIo/Fable.Import.SocketIo"
"Uws/Fable.Import.Uws"
"Mocha/Fable.Import.Mocha"
"VSCode/Fable.Import.VSCode"
"Electron/Fable.Import.Electron"
"Pixi/Fable.Import.Pixi"
"PixiSound/Fable.Import.Pixi.Sound"
"PixiParticles/Fable.Import.Pixi.Particles"
"Animejs/Fable.Import.Animejs"
"GeoJSON/Fable.Geojson"
"Leaflet/Fable.Leaflet"
"HMR/Fable.Import.HMR"
"GoogleMaps/Fable.Import.GoogleMaps"
]
#if MONO
// prevent incorrect output encoding (e.g. https://github.com/fsharp/FAKE/issues/1196)
System.Console.OutputEncoding <- System.Text.Encoding.UTF8
#endif
let mutable dotnetExePath = environVarOrDefault "DOTNET" "dotnet"
// Clean and install dotnet SDK
Target "Bootstrap" (fun () ->
let dotnetcliVersion =
Path.Combine(__SOURCE_DIRECTORY__, "global.json")
|> findLineAndGetGroupValue "\"version\": \"(.*?)\"" 1
!! "**/bin" ++ "**/obj" |> CleanDirs
dotnetExePath <- DotNetCli.InstallDotNetSDK dotnetcliVersion
)
Target "PublishPackages" (fun () ->
packages
|> List.map (fun p -> p + ".fsproj")
|> publishPackages __SOURCE_DIRECTORY__ dotnetExePath
)
"Bootstrap"
==> "PublishPackages"
RunTargetOrDefault "Bootstrap"