forked from nblockchain/conventions
-
Notifications
You must be signed in to change notification settings - Fork 1
/
compileFSharpScripts.fsx
49 lines (43 loc) · 1.09 KB
/
compileFSharpScripts.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
#!/usr/bin/env -S dotnet fsi
open System
open System.IO
#r "nuget: Fsdk, Version=0.6.0--date20230214-0422.git-1ea6f62"
#load "../src/FileConventions/Helpers.fs"
Fsdk
.Process
.Execute(
{
Command = "dotnet"
Arguments = sprintf "new tool-manifest --force"
},
Fsdk.Process.Echo.All
)
.UnwrapDefault()
|> ignore<string>
// we need to install specific version because of this bug: https://github.com/dotnet/sdk/issues/24037
Fsdk
.Process
.Execute(
{
Command = "dotnet"
Arguments = sprintf "tool install fsxc --version 0.5.9.1"
},
Fsdk.Process.Echo.All
)
.UnwrapDefault()
|> ignore<string>
let rootDir = Path.Combine(__SOURCE_DIRECTORY__, "..") |> DirectoryInfo
Helpers.GetFiles rootDir "*.fsx"
|> Seq.iter(fun fileInfo ->
Fsdk
.Process
.Execute(
{
Command = "dotnet"
Arguments = sprintf "fsxc %s" fileInfo.FullName
},
Fsdk.Process.Echo.All
)
.UnwrapDefault()
|> ignore<string>
)