Skip to content

Commit e737a46

Browse files
authored
Merge pull request #575 from ncave/netcore
Netcore build target split
2 parents eb36fdf + e43100b commit e737a46

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

build.fsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ Target "GitHubRelease" (fun _ ->
219219
let isDotnetCliInstalled = (try Shell.Exec("dotnet", "--info") = 0 with _ -> false)
220220
let assertExitCodeZero x = if x = 0 then () else failwithf "Command failed with exit code %i" x
221221

222-
Target "DotnetCliBuild" (fun _ ->
222+
Target "DotnetCliCodeGen" (fun _ ->
223223
let fsLex = @"lib/bootstrap/4.0/fslex.exe"
224224
let fsYacc = @"lib/bootstrap/4.0/fsyacc.exe"
225225
let lexArgs = @" --lexlib Internal.Utilities.Text.Lexing"
@@ -231,9 +231,7 @@ Target "DotnetCliBuild" (fun _ ->
231231
let open2 = @" --open Microsoft.FSharp.Compiler"
232232
let open3 = @" --open Microsoft.FSharp.Compiler"
233233

234-
// FSharp.Compiler.Service
235234
let workDir = @"src/fsharp/FSharp.Compiler.Service.netcore/"
236-
Shell.Exec("dotnet", "restore -v Minimal", workDir) |> assertExitCodeZero
237235

238236
Shell.Exec("dotnet", "fssrgen ../FSComp.txt ./FSComp.fs ./FSComp.resx", workDir) |> assertExitCodeZero
239237
Shell.Exec("dotnet", "fssrgen ../fsi/FSIstrings.txt ./FSIstrings.fs ./FSIstrings.resx", workDir) |> assertExitCodeZero
@@ -243,10 +241,13 @@ Target "DotnetCliBuild" (fun _ ->
243241
Shell.Exec(fsYacc, @"../../absil/ilpars.fsy" + lexArgs + yaccArgs + module1 + open1 + " -o ilpars.fs", workDir) |> assertExitCodeZero
244242
Shell.Exec(fsYacc, @"../pars.fsy" + lexArgs + yaccArgs + module2 + open2 + " -o pars.fs", workDir) |> assertExitCodeZero
245243
Shell.Exec(fsYacc, @"../pppars.fsy" + lexArgs + yaccArgs + module3 + open3 + " -o pppars.fs", workDir) |> assertExitCodeZero
244+
)
246245

246+
Target "DotnetCliBuild" (fun _ ->
247+
let workDir = @"src/fsharp/FSharp.Compiler.Service.netcore/"
248+
Shell.Exec("dotnet", "restore -v Minimal", workDir) |> assertExitCodeZero
247249
Shell.Exec("dotnet", "pack -c Release -o ../../../" + buildDir, workDir) |> assertExitCodeZero
248250

249-
// FSharp.Compiler.Service.ProjectCracker
250251
let workDir = @"src/fsharp/FSharp.Compiler.Service.ProjectCracker.netcore/"
251252
Shell.Exec("dotnet", "restore -v Minimal", workDir) |> assertExitCodeZero
252253
Shell.Exec("dotnet", "pack -c Release -o ../../../" + buildDir, workDir) |> assertExitCodeZero
@@ -255,7 +256,7 @@ Target "DotnetCliBuild" (fun _ ->
255256
Target "DotnetCliTests" (fun _ ->
256257
let workDir = @"tests/FSharp.Compiler.Service.Tests.netcore/"
257258
Shell.Exec("dotnet", "restore -v Minimal", workDir) |> assertExitCodeZero
258-
Shell.Exec("dotnet", "run", workDir) |> assertExitCodeZero
259+
Shell.Exec("dotnet", "run -c Release", workDir) |> assertExitCodeZero
259260
)
260261

261262
// --------------------------------------------------------------------------------------
@@ -265,9 +266,10 @@ Target "Prepare" DoNothing
265266
Target "PrepareRelease" DoNothing
266267
Target "All" DoNothing
267268
Target "Release" DoNothing
268-
Target "AllDotnetCli" DoNothing
269+
Target "DotnetCli" DoNothing
269270

270-
"AllDotnetCli"
271+
"DotnetCli"
272+
=?> ("DotnetCliCodeGen", isDotnetCliInstalled)
271273
=?> ("DotnetCliBuild", isDotnetCliInstalled)
272274
=?> ("DotnetCliTests", isDotnetCliInstalled)
273275

global.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"projects": [ "src/fsharp", "tests" ]
3+
}

tests/global.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)