Skip to content

Commit 5a8fc26

Browse files
All building single project
1 parent e00cf19 commit 5a8fc26

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

build.fsx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,22 @@
33
open Fake
44
open Fake.DotNetCli
55

6+
let project = environVarOrDefault "project" "*"
67
let buildDir = "./build/"
78
let sourceDir = "./exercises/"
9+
let projectDirs = buildDir @@ project
810

9-
let testFiles = !! (buildDir @@ "*/*Test.cs")
10-
let allProjects = !! (buildDir @@ "*/*.csproj")
11+
let testFiles = !! (projectDirs @@ "*Test.cs")
12+
let allProjects = !! (projectDirs @@ "*.csproj")
1113
let defaultProjects =
12-
!! (buildDir @@ "*/*.csproj") --
13-
(buildDir @@ "*/DotDsl.csproj") --
14-
(buildDir @@ "*/Hangman.csproj") --
15-
(buildDir @@ "*/React.csproj")
14+
!! (projectDirs @@ ".csproj") --
15+
(projectDirs @@ "DotDsl.csproj") --
16+
(projectDirs @@ "Hangman.csproj") --
17+
(projectDirs @@ "React.csproj")
1618
let refactoringProjects =
17-
!! (buildDir @@ "*/TreeBuilding.csproj") ++
18-
(buildDir @@ "*/Ledger.csproj") ++
19-
(buildDir @@ "*/Markdown.csproj")
19+
!! (projectDirs @@ "TreeBuilding.csproj") ++
20+
(projectDirs @@ "Ledger.csproj") ++
21+
(projectDirs @@ "Markdown.csproj")
2022

2123
let restore project = DotNetCli.Restore (fun p -> { p with Project = project })
2224
let build project = DotNetCli.Build (fun p -> { p with Project = project })

0 commit comments

Comments
 (0)