Skip to content

Commit 05b4d3f

Browse files
committed
Merge branch 'release/0.25.0' into main
* release/0.25.0: (build) Updated version and release notes. GH-1997: Add support for --trace command line option for NUnit3 settings + runner (GH-1995) Make In-Proc NuGet addin/tool installtion default Adds missing .NET CLI dependencies/restore switches (GH-1937) Speed up in-process NuGet Update MSBuildVerbosityExtensions.cs (GH-1992) Update to .NET Core 1.0.9 / SDK 1.1.7 GH-1987: Normalize exception handling in PropertyToken for invalid parameter index [ci skip] Get more Open Source Helpers Removed unnecessary parameter Fix writing start and end progress messages (GH-1974) Added System.Collections work around for Mono (GH-1689) Add documentation that Chocolatey licensed is required (build) Updated Cake tool to version 0.24.0
2 parents 75c6259 + c072ac9 commit 05b4d3f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+764
-44
lines changed

README.md

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

33
[![NuGet](https://img.shields.io/nuget/v/Cake.svg)](https://www.nuget.org/packages/Cake) [![MyGet](https://img.shields.io/myget/cake/vpre/Cake.svg?label=myget)](https://www.myget.org/gallery/cake) [![Chocolatey](https://img.shields.io/chocolatey/v/Cake.portable.svg)](https://chocolatey.org/packages/cake.portable)
44
[![homebrew](https://img.shields.io/homebrew/v/cake.svg)](http://braumeister.org/formula/cake)
5+
[![Help Contribute to Open Source](https://www.codetriage.com/cake-build/cake/badges/users.svg)](https://www.codetriage.com/cake-build/cake)
56

67
[![Source Browser](https://img.shields.io/badge/Browse-Source-green.svg)](http://sourcebrowser.io/Browse/cake-build/cake)
78

ReleaseNotes.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
### New in 0.25.0 (Released 2018/01/17)
2+
3+
* 1995 Make In-proc NuGet addin/tool installation default
4+
* 1994 Get MSBuild Verbosity enum from string
5+
* 1988 TeamCity writing start and end progress contains invalid messages property
6+
* 1974 ToDictionary on Mono causes "The type 'Dictionary<,>' is defined in an assembly that is not referenced"
7+
* 1998 Some .NET Core commands missing no dependencies/restore
8+
* 1997 Add the --trace option to the NUnit3Settings class.
9+
* 1992 Update to .NET Runtime 1.0.9 because security issues
10+
* 1989 Path unnecessarily trims backslash in already normalized string
11+
* 1987 Confusing Error from Bad Format String to Information()
12+
* 1937 UseInProcessClient=true is slow
13+
* 1982 CodeTriage - Get more Open Source Helpers
14+
* 1689 ChocolateyDownload should be documented to only work in paid edition
15+
116
### New in 0.24.0 (Released 2017/12/29)
217

318
* 1950 Allow Cake modules to be bootstrapped by Cake in a pre-processing phase

build.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ Param(
3131
[string[]]$ScriptArgs
3232
)
3333

34-
$CakeVersion = "0.23.0"
34+
$CakeVersion = "0.24.0"
3535
$DotNetChannel = "Current";
36-
$DotNetVersion = "1.1.5";
36+
$DotNetVersion = "1.1.7";
3737
$DotNetInstallerUri = "https://dot.net/v1/dotnet-install.ps1";
3838
$NugetUrl = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
3939

build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
1010
TOOLS_DIR=$SCRIPT_DIR/tools
1111
NUGET_EXE=$TOOLS_DIR/nuget.exe
1212
NUGET_URL=https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
13-
CAKE_VERSION=0.23.0
13+
CAKE_VERSION=0.24.0
1414
CAKE_EXE=$TOOLS_DIR/Cake.$CAKE_VERSION/Cake.exe
1515

1616
# Temporarily skip verification and opt-in to new in-proc NuGet
@@ -50,7 +50,7 @@ if [ ! -d "$SCRIPT_DIR/.dotnet" ]; then
5050
mkdir "$SCRIPT_DIR/.dotnet"
5151
fi
5252
curl -Lsfo "$SCRIPT_DIR/.dotnet/dotnet-install.sh" https://dot.net/v1/dotnet-install.sh
53-
sudo bash "$SCRIPT_DIR/.dotnet/dotnet-install.sh" --version 1.1.5 --install-dir .dotnet --no-path
53+
sudo bash "$SCRIPT_DIR/.dotnet/dotnet-install.sh" --version 1.1.7 --install-dir .dotnet --no-path
5454
export PATH="$SCRIPT_DIR/.dotnet":$PATH
5555
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
5656
export DOTNET_CLI_TELEMETRY_OPTOUT=1

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"projects": [ "src" ],
33
"sdk": {
4-
"version": "1.1.5"
4+
"version": "1.1.7"
55
}
66
}

src/Cake.Common.Tests/Unit/Tools/DotNetCore/Build/DotNetCoreBuilderTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,14 @@ public void Should_Add_Build_Arguments()
147147
var fixture = new DotNetCoreBuilderFixture();
148148
fixture.Settings.NoIncremental = true;
149149
fixture.Settings.NoDependencies = true;
150+
fixture.Settings.NoRestore = true;
150151
fixture.Project = "./src/*";
151152

152153
// When
153154
var result = fixture.Run();
154155

155156
// Then
156-
Assert.Equal("build \"./src/*\" --no-incremental --no-dependencies", result.Args);
157+
Assert.Equal("build \"./src/*\" --no-incremental --no-dependencies --no-restore", result.Args);
157158
}
158159

159160
[Fact]

src/Cake.Common.Tests/Unit/Tools/DotNetCore/Pack/DotNetCorePackerTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ public void Should_Add_Settings()
106106
// Given
107107
var fixture = new DotNetCorePackFixture();
108108
fixture.Settings.NoBuild = true;
109+
fixture.Settings.NoDependencies = true;
110+
fixture.Settings.NoRestore = true;
109111
fixture.Settings.Configuration = "Release";
110112
fixture.Settings.OutputDirectory = "./artifacts/";
111113
fixture.Settings.VersionSuffix = "rc1";
@@ -118,7 +120,7 @@ public void Should_Add_Settings()
118120
var result = fixture.Run();
119121

120122
// Then
121-
Assert.Equal("pack --output \"/Working/artifacts\" --no-build --include-symbols --include-source --configuration Release --version-suffix rc1 --serviceable --verbosity Minimal", result.Args);
123+
Assert.Equal("pack --output \"/Working/artifacts\" --no-build --no-dependencies --no-restore --include-symbols --include-source --configuration Release --version-suffix rc1 --serviceable --verbosity Minimal", result.Args);
122124
}
123125

124126
[Fact]

src/Cake.Common.Tests/Unit/Tools/DotNetCore/Publish/DotNetCorePublisherTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ public void Should_Add_Settings()
105105
{
106106
// Given
107107
var fixture = new DotNetCorePublisherFixture();
108+
fixture.Settings.NoDependencies = true;
109+
fixture.Settings.NoRestore = true;
108110
fixture.Settings.Framework = "dnxcore50";
109111
fixture.Settings.Configuration = "Release";
110112
fixture.Settings.Runtime = "runtime1";
@@ -116,7 +118,7 @@ public void Should_Add_Settings()
116118
var result = fixture.Run();
117119

118120
// Then
119-
Assert.Equal("publish --output \"/Working/artifacts\" --runtime runtime1 --framework dnxcore50 --configuration Release --version-suffix rc1 --verbosity Minimal", result.Args);
121+
Assert.Equal("publish --output \"/Working/artifacts\" --runtime runtime1 --framework dnxcore50 --configuration Release --version-suffix rc1 --no-dependencies --no-restore --verbosity Minimal", result.Args);
120122
}
121123

122124
[Fact]

src/Cake.Common.Tests/Unit/Tools/DotNetCore/Test/DotNetCoreTesterTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ public void Should_Add_Additional_Settings()
108108
// Given
109109
var fixture = new DotNetCoreTesterFixture();
110110
fixture.Settings.NoBuild = true;
111+
fixture.Settings.NoRestore = true;
111112
fixture.Settings.Framework = "dnxcore50";
112113
fixture.Settings.Configuration = "Release";
113114
fixture.Settings.OutputDirectory = "./artifacts/";
@@ -122,7 +123,7 @@ public void Should_Add_Additional_Settings()
122123
var result = fixture.Run();
123124

124125
// Then
125-
Assert.Equal("test --settings \"/Working/demo.runsettings\" --filter \"Priority = 1\" --test-adapter-path \"/Working/custom-test-adapter\" --logger \"trx;LogFileName=/Working/logfile.trx\" --output \"/Working/artifacts\" --framework dnxcore50 --configuration Release --diag \"/Working/artifacts/logging/diagnostics.txt\" --no-build --results-directory \"/Working/tests\"", result.Args);
126+
Assert.Equal("test --settings \"/Working/demo.runsettings\" --filter \"Priority = 1\" --test-adapter-path \"/Working/custom-test-adapter\" --logger \"trx;LogFileName=/Working/logfile.trx\" --output \"/Working/artifacts\" --framework dnxcore50 --configuration Release --diag \"/Working/artifacts/logging/diagnostics.txt\" --no-build --no-restore --results-directory \"/Working/tests\"", result.Args);
126127
}
127128

128129
[Fact]
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
// See the LICENSE file in the project root for more information.
4+
5+
using System.Linq;
6+
using Cake.Common.Tools.MSBuild;
7+
using Cake.Core;
8+
using Cake.Core.Diagnostics;
9+
using Xunit;
10+
11+
namespace Cake.Common.Tests.Unit.Tools.MSBuild
12+
{
13+
public sealed class MSBuildVerbosityExtensionsTests
14+
{
15+
public sealed class GetMSBuildVerbosityMethod
16+
{
17+
[Theory]
18+
[InlineData("quiet", Verbosity.Quiet)]
19+
[InlineData("minimal", Verbosity.Minimal)]
20+
[InlineData("normal", Verbosity.Normal)]
21+
[InlineData("detailed", Verbosity.Verbose)]
22+
[InlineData("diagnostic", Verbosity.Diagnostic)]
23+
public void Should_Convert_Valid_String_To_Verbosity_Enum(string verbosityName, Verbosity expectedVerbosity)
24+
{
25+
// Given
26+
27+
// When
28+
var actualVerbosity = MSBuildVerbosityExtensions.GetMSBuildVerbosity(verbosityName);
29+
30+
// Then
31+
Assert.Equal(expectedVerbosity, actualVerbosity);
32+
}
33+
34+
[Theory]
35+
[InlineData("QUIET", Verbosity.Quiet)]
36+
[InlineData("MINIMAL", Verbosity.Minimal)]
37+
[InlineData("NORMAL", Verbosity.Normal)]
38+
[InlineData("DETAILED", Verbosity.Verbose)]
39+
[InlineData("DIAGNOSTIC", Verbosity.Diagnostic)]
40+
public void Should_Convert_Valid_UpperCase_String_To_Verbosity_Enum(string verbosityName, Verbosity expectedVerbosity)
41+
{
42+
// Given
43+
44+
// When
45+
var actualVerbosity = MSBuildVerbosityExtensions.GetMSBuildVerbosity(verbosityName);
46+
47+
// Then
48+
Assert.Equal(expectedVerbosity, actualVerbosity);
49+
}
50+
51+
[Fact]
52+
public void Should_Throws_Exception_When_Parameter_Is_Null()
53+
{
54+
// Given
55+
56+
// When
57+
var actualException = Assert.Throws<CakeException>(() => MSBuildVerbosityExtensions.GetMSBuildVerbosity(null));
58+
59+
// Then
60+
Assert.Equal("Encountered unknown MSBuild build log verbosity ''. Valid values are 'quiet', 'minimal', 'normal', 'detailed' and 'diagnostic'.", actualException.Message);
61+
}
62+
63+
[Theory]
64+
[InlineData("", "Encountered unknown MSBuild build log verbosity ''. Valid values are 'quiet', 'minimal', 'normal', 'detailed' and 'diagnostic'.")]
65+
[InlineData("invalid", "Encountered unknown MSBuild build log verbosity 'invalid'. Valid values are 'quiet', 'minimal', 'normal', 'detailed' and 'diagnostic'.")]
66+
public void Should_Throws_Exception_When_Parameter_Has_Invalid_Value(string invalidVerbosityValue, string expectedMessage)
67+
{
68+
// Given
69+
70+
// When
71+
var actualException = Assert.Throws<CakeException>(() => MSBuildVerbosityExtensions.GetMSBuildVerbosity(invalidVerbosityValue));
72+
73+
// Then
74+
Assert.Equal(expectedMessage, actualException.Message);
75+
}
76+
}
77+
}
78+
}

0 commit comments

Comments
 (0)