Skip to content

Commit

Permalink
Merge branch 'release/2.0.0-rc0002'
Browse files Browse the repository at this point in the history
  • Loading branch information
augustoproiete committed Nov 27, 2021
2 parents cf59599 + 0737513 commit 68034f4
Show file tree
Hide file tree
Showing 71 changed files with 1,357 additions and 167 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"cake.tool": {
"version": "1.3.0",
"version": "2.0.0-rc0001",
"commands": [
"dotnet-cake"
]
Expand Down
135 changes: 135 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,138 @@
### New in 2.0.0-rc0002 (Released 2021/11/26)

* 3714 Use Basic.Reference.Assemblies.* to ensure all standard reference assemblies are available for Roslyn
* 3654 IsRunningOnAzurePipelines should ignore agent type
* 3631 Refactor GitHub Actions Paths
* 3610 Remove TFBuildProvider
* 3590 Directories in AzurePipelinesBuildInfo are FilePaths - FilePath.GetDirectory then inconsistent
* 3581 Stop shipping Cake.Portable Chocolatey package and Cake Homebrew formulae
* 3579 Stop shipping Cake runner for .NET Framework and Cake runner for .NET Core
* 3577 Remove ReverseDependencyAttribute
* 3572 Only build for TargetFrameworks netcoreapp3.1, net5.0 and net6.0
* 3282 GitVersion Tool: Rename verbosity values to match GitVersion values
* 3222 Add Xamarin.iOS platform targets to MSBuildSettings PlatformTarget enumeration
* 3151 Add support for Engine event hooks after execution as well as before
* 3003 Remove DependencyAttribute
* 2872 Bump eol target frameworks
* 2788 Tool:OpenCover - the register-setting should be an option, rather than a string
* 1111 DotNetCoreRestore: dotnet restore no longer supports globbing
* 3630 Add GitHub Actions Environment properties
* 3629 Add GitHub Actions UploadArtifact Command
* 3628 Add GitHub Actions SetEnvironmentVariable Command
* 3627 Add GitHub Actions AddPath Command
* 3341 Epic: Introduce DotNet aliases (synonyms to DotNetCore aliases)
* 3711 SemanticVersion missing equals/not equals operator, prerelease sorted wrong
* 3697 Error: The requested service 'Cake.Commands.DefaultCommandSettings' has not been registered
* 3693 `Core` suffix is still used in some settings classes
* 3683 Use DotNetMSBuildSettings instead of DotNetCoreMSBuildSettings on new dotnet aliases settings
* 3671 VS2022: msbuild can not be located, only Build Tools are installed
* 2443 Erroneous "Target path must be an absolute path" when preserveFolderStructure is used with CopyFiles
* 1669 Release notes does not tolerate prerelease versions
* 3709 Arguments alias should support ICollection<T> as default value
* 3691 Update Microsoft.NETCore.Platforms to 6.0.0
* 3690 Update Microsoft.Extensions.DependencyInjection to 6.0.0
* 3689 Update System.Reflection.Metadata to 6.0.0
* 3688 Update System.Collections.Immutable to 6.0.0
* 3681 `ScriptAssemblyResolver` logging should be at debug/diagnostic level
* 3662 Update Microsoft.CodeAnalysis.CSharp.Scripting to 4.0.0-6.final
* 3647 Display message of criteria when task fails to run due to criteria not being met
* 3644 Add DotNetNuGetUpdateSource aliases (synonym to DotNetCoreNuGetUpdateSource)
* 3643 Add DotNetNuGetRemoveSource aliases (synonym to DotNetCoreNuGetRemoveSource)
* 3642 Add DotNetNuGetListSourceSettings (derived from to DotNetNuGetSource)
* 3641 Add DotNetNuGetHasSource aliases (synonym to DotNetCoreNuGetHasSource)
* 3640 Add DotNetNuGetEnableSource aliases (synonym to DotNetCoreNuGetEnableSource)
* 3639 Add DotNetNuGetDisableSource aliases (synonym to DotNetCoreNuGetDisableSource)
* 3607 Add `EnableCompressionInSingleFile` to `DotNetCorePublishSettings`
* 3599 Add VS2022 to default MSBuild Resolver
* 3598 Remove Preview from VS2022 MSBuild Resolver
* 3595 Update Autofac to 6.3.0
* 3593 Update Microsoft.CodeAnalysis.CSharp.Scripting to 4.0.0-5.final
* 3591 Update Microsoft.NETCore.Platforms to 6.0.0-rc.2.21480.5
* 3555 Add DotNetNuGetAddSource aliases (synonym to DotNetCoreNuGetAddSource)
* 3554 Add DotNetNuGetDelete aliases (synonym to DotNetCoreNuGetDelete)
* 3553 Add DotNetNuGetPush aliases (synonym to DotNetCoreNuGetPush)
* 3552 Add DotNetPack alias (synonym to DotNetCorePack)
* 3551 Add DotNetPublish alias (synonym to DotNetCorePublish)
* 3550 Add DotNetVSTest alias (synonym to DotNetCoreVSTest)
* 3549 Add DotNetTest alias (synonym to DotNetCoreTest)
* 3548 Add DotNetBuildServer alias (synonym to DotNetCoreBuildServer)
* 3547 Add DotNetBuild alias (synonym to DotNetCoreBuild)
* 3546 Add DotNetRestore alias (synonym to DotNetCoreRestore)
* 3545 Add DotNetClean alias (synonym to DotNetCoreClean)
* 3544 Add DotNetExecute alias (synonym to DotNetCoreExecute)
* 3543 Add DotNetRun alias (synonym to DotNetCoreRun)
* 3542 Add DotNetTool alias (synonym to DotNetCoreTool)
* 3523 Add DotNetMSBuild alias (synonym to DotNetCoreMSBuild)
* 3215 Add RunCommand with postAction parameter to DotNetCoreTool
* 3075 Make FilePath and DirectoryPath comparable by value
* 2571 OctopusDeploy DeployTo property to take collection of string to specify multiple environments
* 2075 Add overloads for DotNetCore*() methods taking FilePath instead of string
* 1794 Private is missing from ProjectReference
* 1616 Error message on circular references leads to poor developer experience
* 3701 Add cake-module tag to Cake.DotNetTool.Module NuGet package
* 3602 Switch to Cake.Tool as primary package in REAME.md

### New in 2.0.0-rc0001 (Released 2021/11/07)

* 3654 IsRunningOnAzurePipelines should ignore agent type
* 3631 Refactor GitHub Actions Paths
* 3610 Remove TFBuildProvider
* 3590 Directories in AzurePipelinesBuildInfo are FilePaths - FilePath.GetDirectory then inconsistent
* 3581 Stop shipping Cake.Portable Chocolatey package and Cake Homebrew formulae
* 3579 Stop shipping Cake runner for .NET Framework and Cake runner for .NET Core
* 3577 Remove ReverseDependencyAttribute
* 3572 Only build for TargetFrameworks netcoreapp3.1, net5.0 and net6.0
* 3282 GitVersion Tool: Rename verbosity values to match GitVersion values
* 3222 Add Xamarin.iOS platform targets to MSBuildSettings PlatformTarget enumeration
* 3151 Add support for Engine event hooks after execution as well as before
* 3003 Remove DependencyAttribute
* 2872 Bump eol target frameworks
* 2788 Tool:OpenCover - the register-setting should be an option, rather than a string
* 1111 DotNetCoreRestore: dotnet restore no longer supports globbing
* 3341 Introduce DotNet aliases (synonyms to DotNetCore aliases
* 3627 Add GitHub Actions AddPath Command
* 3628 Add GitHub Actions SetEnvironmentVariable Command
* 3629 Add GitHub Actions UploadArtifact Command
* 3630 Add GitHub Actions Environment properties
* 3662 Update Microsoft.CodeAnalysis.CSharp.Scripting to 4.0.0-6.final
* 3647 Display message of criteria when task fails to run due to criteria not being met
* 3644 Add DotNetNuGetUpdateSource aliases (synonym to DotNetCoreNuGetUpdateSource)
* 3643 Add DotNetNuGetRemoveSource aliases (synonym to DotNetCoreNuGetRemoveSource)
* 3642 Add DotNetNuGetListSourceSettings (derived from to DotNetNuGetSource)
* 3641 Add DotNetNuGetHasSource aliases (synonym to DotNetCoreNuGetHasSource)
* 3640 Add DotNetNuGetEnableSource aliases (synonym to DotNetCoreNuGetEnableSource)
* 3639 Add DotNetNuGetDisableSource aliases (synonym to DotNetCoreNuGetDisableSource)
* 3607 Add EnableCompressionInSingleFile to DotNetCorePublishSettings
* 3599 Add VS2022 to default MSBuild Resolver
* 3598 Remove Preview from VS2022 MSBuild Resolver
* 3595 Update Autofac to 6.3.0
* 3593 Update Microsoft.CodeAnalysis.CSharp.Scripting to 4.0.0-5.final
* 3591 Update Microsoft.NETCore.Platforms to 6.0.0-rc.2.21480.5
* 3555 Add DotNetNuGetAddSource aliases (synonym to DotNetCoreNuGetAddSource)
* 3554 Add DotNetNuGetDelete aliases (synonym to DotNetCoreNuGetDelete)
* 3553 Add DotNetNuGetPush aliases (synonym to DotNetCoreNuGetPush)
* 3552 Add DotNetPack alias (synonym to DotNetCorePack)
* 3551 Add DotNetPublish alias (synonym to DotNetCorePublish)
* 3550 Add DotNetVSTest alias (synonym to DotNetCoreVSTest)
* 3549 Add DotNetTest alias (synonym to DotNetCoreTest)
* 3548 Add DotNetBuildServer alias (synonym to DotNetCoreBuildServer)
* 3547 Add DotNetBuild alias (synonym to DotNetCoreBuild)
* 3546 Add DotNetRestore alias (synonym to DotNetCoreRestore)
* 3545 Add DotNetClean alias (synonym to DotNetCoreClean)
* 3544 Add DotNetExecute alias (synonym to DotNetCoreExecute)
* 3543 Add DotNetRun alias (synonym to DotNetCoreRun)
* 3542 Add DotNetTool alias (synonym to DotNetCoreTool)
* 3523 Add DotNetMSBuild alias (synonym to DotNetCoreMSBuild)
* 3215 Add RunCommand with postAction parameter to DotNetCoreTool
* 3075 Make FilePath and DirectoryPath comparable by value
* 2571 OctopusDeploy DeployTo property to take collection of string to specify multiple environments
* 2075 Add overloads for DotNetCore*() methods taking FilePath instead of string
* 1794 Private is missing from ProjectReference
* 1616 Error message on circular references leads to poor developer experience
* 1669 Release notes does not tolerate prerelease versions
* 2443 Erroneous "Target path must be an absolute path" when preserveFolderStructure is used with CopyFiles
* 3602 Switch to Cake.Tool as primary package in REAME.md

### New in 1.3.0 (Released 2021/10/07)

* 3469 Add support for .NET 6
Expand Down
2 changes: 2 additions & 0 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,8 @@ Task("Run-Integration-Tests")
.AppendSwitchQuoted("--multipleargs", "=", "b")
.AppendSwitchQuoted("--testAssemblyDirectoryPath", "=", cakeAssembly.GetDirectory().FullPath)
.AppendSwitchQuoted("--testAssemblyFilePath", "=", cakeAssembly.FullPath)
.AppendSwitchQuoted("--testDotNetCoreVerbosity", "=", "Diagnostic")
.AppendSwitchQuoted("--testDotNetRollForward", "=", "LatestMajor")
});
}
catch(Exception ex)
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"src"
],
"sdk": {
"version": "6.0.100-rc.2.21505.57",
"version": "6.0.100",
"rollForward": "latestFeature"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using Cake.Common.Tools.DotNet.Build;
using Cake.Common.Tools.DotNetCore.Build;

namespace Cake.Common.Tests.Fixtures.Tools.DotNetCore.Build
{
internal sealed class DotNetCoreBuilderFixture : DotNetCoreFixture<DotNetCoreBuildSettings>
internal sealed class DotNetCoreBuilderFixture : DotNetCoreFixture<DotNetBuildSettings>
{
public string Project { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using Cake.Common.Tools.DotNet.BuildServer;
using Cake.Common.Tools.DotNetCore.BuildServer;

namespace Cake.Common.Tests.Fixtures.Tools.DotNetCore.Build
{
internal sealed class DotNetCoreBuildServerFixture : DotNetCoreFixture<DotNetCoreBuildServerSettings>
internal sealed class DotNetCoreBuildServerFixture : DotNetCoreFixture<DotNetBuildServerShutdownSettings>
{
protected override void RunTool()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using Cake.Common.Tools.DotNet.Clean;
using Cake.Common.Tools.DotNetCore.Clean;

namespace Cake.Common.Tests.Fixtures.Tools.DotNetCore.Clean
{
internal sealed class DotNetCoreCleanerFixture : DotNetCoreFixture<DotNetCoreCleanSettings>
internal sealed class DotNetCoreCleanerFixture : DotNetCoreFixture<DotNetCleanSettings>
{
public string Project { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using Cake.Common.Tools.DotNetCore;
using Cake.Common.Tools.DotNet;
using Cake.Core.IO;
using Cake.Testing.Fixtures;

namespace Cake.Common.Tests.Fixtures.Tools.DotNetCore
{
internal abstract class DotNetCoreFixture<TSettings> : ToolFixture<TSettings, ToolFixtureResult>
where TSettings : DotNetCoreSettings, new()
where TSettings : DotNetSettings, new()
{
protected DotNetCoreFixture()
: base("dotnet.exe")
Expand Down
52 changes: 52 additions & 0 deletions src/Cake.Common.Tests/Unit/ArgumentAliasesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.Collections.Generic;
using System.Linq;
using Cake.Core;
Expand Down Expand Up @@ -73,6 +74,57 @@ public void Should_Return_An_Arguments_Dictionary()
Assert.Equal(VerboseArgumentValueOne, vValues.ElementAt(0));
Assert.Equal(VerboseArgumentValueTwo, vValues.ElementAt(1));
}

[Fact]
public void Should_Return_An_Arguments_With_Single_DefaultValue()
{
var context = Substitute.For<ICakeContext>();
context.Arguments.GetArguments(Arg.Any<string>())
.Returns(Array.Empty<string>());

// Given
var expect = new[] { "a" };

// When
var arg = context.Arguments<string>("nonexistingmultipleargs", expect[0]);

// Then
Assert.Equal(expect, arg);
}

[Fact]
public void Should_Return_An_Arguments_With_Multiple_DefaultValue()
{
var context = Substitute.For<ICakeContext>();
context.Arguments.GetArguments(Arg.Any<string>())
.Returns(Array.Empty<string>());

// Given
var expect = new[] { "a", "b" };

// When
var arg = context.Arguments<string>("nonexistingmultipleargs", expect);

// Then
Assert.Equal(expect, arg);
}

[Fact]
public void Should_Return_An_Arguments_With_Lazy_DefaultValue()
{
var context = Substitute.For<ICakeContext>();
context.Arguments.GetArguments(Arg.Any<string>())
.Returns(Array.Empty<string>());

// Given
var expect = new[] { "a", "b" };

// When
var arg = context.Arguments<string>("nonexistingmultipleargs", _ => expect);

// Then
Assert.Equal(expect, arg);
}
}
}
}
Loading

0 comments on commit 68034f4

Please sign in to comment.