Uses dotnet tools from nixpkgs instead of nuget. New deps handling produces a lot of lockfiles. Added runtimeid to avoid hash missmatch
59 lines
1.1 KiB
Forth
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 |