Skip to content

Commit

Permalink
build: Add "install" target
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarmil committed Nov 26, 2023
1 parent 4764306 commit 6443f40
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .build/build.fs
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,14 @@ Target.create "pack" <| fun o ->
ToolType = ToolType.CreateLocalTool()
}

Target.description "Test all the template projects by building them."
Target.create "test-build" <| fun o ->
// Install the newly created template
Target.description "Install the locally built template. Warning: uninstalls any previously installed version."
Target.create "install" <| fun o ->
if (dotnetOutput "new" ["list"]).Contains("bolero-app") then
dotnet "new" ["uninstall"; packageName]
dotnet "new" ["install"; packageOutputFile o; "--force"]

Target.description "Test all the template projects by building them."
Target.create "test-build" <| fun o ->
// For each template variant, create and build a new project
let testsDir = slnDir </> "test-build"
if cleanTest o && Directory.Exists(testsDir) then
Expand All @@ -109,6 +110,7 @@ Target.create "release" ignore

// Main dep path with soft dependencies
"pack"
==> "install"
==> "test-build"
==> "release"
|> ignore
Expand Down

0 comments on commit 6443f40

Please sign in to comment.