forked from tarsgate/conventions
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompileFSharpScripts.fsx
More file actions
executable file
·36 lines (27 loc) · 937 Bytes
/
Copy pathcompileFSharpScripts.fsx
File metadata and controls
executable file
·36 lines (27 loc) · 937 Bytes
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
#!/usr/bin/env -S dotnet fsi
open System
open System.IO
#r "nuget: Fsdk, Version=0.9.99--date20260618-1029.git-79ec1be"
open Fsdk
#load "../src/FileConventions/Helpers.fs"
Process
.ExecDefault("dotnet new tool-manifest --force")
.UnwrapDefault()
|> ignore<string>
// we need to install specific version because of this bug: https://github.com/dotnet/sdk/issues/24037
Process
.ExecDefault(
"dotnet tool install fsxc --version 0.9.99--date20260618-1029.git-79ec1be"
)
.UnwrapDefault()
|> ignore<string>
let rootDir = Path.Combine(__SOURCE_DIRECTORY__, "..") |> DirectoryInfo
let currentDir = Directory.GetCurrentDirectory() |> DirectoryInfo
let targetDir, _ = Helpers.PreferLessDeeplyNestedDir currentDir rootDir
Helpers.GetFiles targetDir "*.fsx"
|> Seq.iter(fun fileInfo ->
Process
.ExecDefault(sprintf "dotnet fsxc %s" fileInfo.FullName)
.UnwrapDefault()
|> ignore<string>
)