-
-
Notifications
You must be signed in to change notification settings - Fork 741
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/0.30.0' into main
* release/0.30.0: (22 commits) (build) Updated version and release notes. (GH-2214) Use Environment.CommandLine directly and remove polyfill. (GH-2238) Add repository metadata to NuGet packages Added alias for checking if the current run is a dry run. Execute setup and teardown when dry running script. (GH-2233) Documented bootstrap argument (GH-2232) Document exclusive argument (GH-2234) Removed Mono from CakeOption Add XML comments for CakeTaskExtensions Fix CakeTaskExtensions accessibility (build) Change tool name & fix packaging (build) Added Cake.Tool package to parameters.cake Allow opting out from using working directory. (GH-2067) Cake .NET Core Tool package * Updates SDK * Addes Cake.Tool project * Fixes #2067 * Fixes #1644 Support for DotCover configuration file added - fixes #1401 Initialized all tool settings collection properties Failing tests for initialized tool settings collections (GH-2207) Update to NuGet 4.7.0 (GH-2220) Corrected documentation for InnoSetup alias (doc) Minor modification ...
- Loading branch information
Showing
68 changed files
with
742 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,6 @@ | |
"src" | ||
], | ||
"sdk": { | ||
"version": "2.1.4" | ||
"version": "2.1.400" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// 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.Collections.Generic; | ||
using System.Linq; | ||
using System.Reflection; | ||
using Cake.Core.Tooling; | ||
using Cake.Testing; | ||
using Cake.Testing.Extensions; | ||
using Xunit; | ||
|
||
namespace Cake.Common.Tests.CrossCutting | ||
{ | ||
public static class ToolSettingsTests | ||
{ | ||
// Ensures that C# initializer syntax will not throw NullReferenceException when collection properties are used. | ||
[Theory] | ||
[MemberData(nameof(ToolSettingsTypes))] | ||
public static void Tool_settings_collection_properties_must_be_initialized(MemberTestInfo<PropertyInfo> toolSettingsProperty) | ||
{ | ||
Assert.NotNull(toolSettingsProperty.Member.GetValue(toolSettingsProperty.Instance)); | ||
} | ||
|
||
public static IEnumerable<object[]> ToolSettingsTypes => | ||
from type in MemberTestingUtils.GetMembersToTest(typeof(ToolSettings), type => | ||
type.GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly) | ||
.Where(property => !property.PropertyType.IsArray | ||
&& property.PropertyType.ImplementsInterfaceDefinition(typeof(ICollection<>)))) | ||
select new object[] { type }; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// 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.ComponentModel; | ||
using System.Globalization; | ||
using Cake.Core; | ||
using Cake.Core.Annotations; | ||
|
||
namespace Cake.Common | ||
{ | ||
/// <summary> | ||
/// Contains functionality related to arguments. | ||
/// </summary> | ||
[CakeAliasCategory("Dry Run")] | ||
public static class DryRunAliases | ||
{ | ||
/// <summary> | ||
/// Determines whether or not the current script execution is a dry run. | ||
/// </summary> | ||
/// <param name="context">The context.</param> | ||
/// <returns>Whether or not the current script execution is a dry run.</returns> | ||
/// <example> | ||
/// <code> | ||
/// Setup(context => | ||
/// { | ||
/// if (!context.IsDryRun()) | ||
/// { | ||
/// // Do things that you don't want to | ||
/// // do when script is being dry runned. | ||
/// } | ||
/// }); | ||
/// </code> | ||
/// </example> | ||
[CakeMethodAlias] | ||
public static bool IsDryRun(this ICakeContext context) | ||
{ | ||
return (context.Argument<bool?>("dryrun", false) ?? true) | ||
|| (context.Argument<bool?>("noop", false) ?? true) | ||
|| (context.Argument<bool?>("whatif", false) ?? true); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.