Files
Poseidon/src/DataAgent/.build/Build.fs
Moritz Jörg 5fb18877c4 refactor(nix): Change nix deps handling and bump sdslite
Uses dotnet tools from nixpkgs instead of nuget.

New deps handling produces a lot of lockfiles.

Added runtimeid to avoid hash missmatch
2025-09-15 15:01:44 +02:00

59 lines
1.1 KiB
Forth

open Fake.Core
open Fake.IO
open Farmer
open Farmer.Builders
open Helpers
initializeContext()
let libPath = Path.getFullName "src/DataAgent"
let testPath = Path.getFullName "tests"
let distPath = Path.getFullName "dist"
let packPath = Path.getFullName "../../packages"
Target.create "Clean" (fun _ -> Shell.cleanDir distPath)
Target.create "Bundle" (fun _ ->
run dotnet $"publish -c Release -o \"{distPath}\"" libPath
)
Target.create "BundleDebug" (fun _ ->
run dotnet $"publish -c Debug -o \"{distPath}\"" libPath
)
Target.create "Pack" (fun _ ->
run dotnet $"pack -c Release -o \"{packPath}\"" libPath
)
Target.create "Format" (fun _ ->
run fantomas ". -r" "src"
)
Target.create "Test" (fun _ ->
if System.IO.Directory.Exists testPath then
run dotnet "run" testPath
else ()
)
Target.create "Run" (fun _ -> Target.runOrDefault "Pack")
open Fake.Core.TargetOperators
let dependencies = [
"Clean"
==> "Bundle"
"Clean"
==> "BundleDebug"
"Clean"
==> "Test"
"Clean"
==> "Pack"
]
[<EntryPoint>]
let main args = runOrDefault args