Skip to content

Commit c07ab63

Browse files
NumpsyTheAngryByrd
andauthored
Msbuild max cpu (updated) (#2789)
* Ability to set maxcpu in msbuild on unix * Update tests --------- Co-authored-by: Jimmy Byrd <jimmy.byrd@motivity.net>
1 parent 033ab08 commit c07ab63

File tree

3 files changed

+7
-18
lines changed

3 files changed

+7
-18
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## 6.1.0 - 2024-07-27
44
* BUGFIX: MSBuild.build adds a bad string at the end of properties, thanks @0x53A - https://github.com/fsprojects/FAKE/issues/2738
5+
* BUGFIX: Allow setting Msbuild max cpu on Linux, thanks @TheAngryByrd - https://github.com/fsprojects/FAKE/pull/2772
56
* ENHANCEMENT: Added shorthash to git functions, thanks @voronoipotato - https://github.com/fsprojects/FAKE/pull/2752
67
* ENHANCEMENT: Support for `/tl:[auto:on:off]` msbuild flag, thanks @smoothdeveloper - https://github.com/fsprojects/FAKE/pull/2768
78
* ENHANCEMENT: Fixes for usage in .NET 8.0 enviroment projects.

src/app/Fake.DotNet.MSBuild/MSBuild.fs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -885,10 +885,9 @@ module MSBuild =
885885

886886
[ yield restoreFlag
887887
yield targets
888-
if not Environment.isUnix then
889-
yield maxCpu
890-
yield noLogo
891-
yield nodeReuse
888+
yield maxCpu
889+
yield noLogo
890+
yield nodeReuse
892891
yield
893892
(match p.TerminalLogger with
894893
| MSBuildTerminalLoggerOption.Off -> Some("tl", "off")

src/test/Fake.Core.UnitTests/Fake.DotNet.MSBuild.fs

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@ let tests =
1717
else
1818
expected.Trim()
1919

20-
let expected =
21-
if Environment.isUnix then
22-
$"{expected} /p:RestorePackages=False".Trim()
23-
else
24-
$"/m /nodeReuse:False {expected} /p:RestorePackages=False".Trim()
20+
let expected = $"/m /nodeReuse:False {expected} /p:RestorePackages=False".Trim()
2521

2622
Expect.equal cmdLine expected $"Expected a given cmdLine '{expected}', but got '{cmdLine}'."
2723

@@ -36,10 +32,7 @@ let tests =
3632
Properties = [ "OutputPath", "C:\\Test\\" ] })
3733

3834
let expected =
39-
if Environment.isUnix then
40-
"/p:RestorePackages=False /p:OutputPath=C:%5CTest%5C"
41-
else
42-
"/m /nodeReuse:False /p:RestorePackages=False /p:OutputPath=C:%5CTest%5C"
35+
"/m /nodeReuse:False /p:RestorePackages=False /p:OutputPath=C:%5CTest%5C"
4336

4437
Expect.equal cmdLine expected "Expected a given cmdline."
4538
testCase "Test that /restore is included #2160"
@@ -50,11 +43,7 @@ let tests =
5043
ConsoleLogParameters = []
5144
DoRestore = true })
5245

53-
let expected =
54-
if Environment.isUnix then
55-
"/restore /p:RestorePackages=False"
56-
else
57-
"/restore /m /nodeReuse:False /p:RestorePackages=False"
46+
let expected = "/restore /m /nodeReuse:False /p:RestorePackages=False"
5847

5948
Expect.equal cmdLine expected "Expected a given cmdline."
6049

0 commit comments

Comments
 (0)