diff --git a/build/Build.Announce.cs b/build/Build.Announce.cs index c3a09433f..b3f8c1b96 100644 --- a/build/Build.Announce.cs +++ b/build/Build.Announce.cs @@ -71,11 +71,9 @@ partial class Build } IEnumerable<(string Text, string Url)> AnnouncementSponsors => - new (string Text, string Url)[] - { - ("Octopus Deploy", "https://octopus.com/"), - ("Amazon Web Services", "https://aws.amazon.com/"), - }; + [ + ("Octopus Deploy", "https://octopus.com/") + ]; // https://api.slack.com/apps/A050ZLH0V40/incoming-webhooks? [Parameter] [Secret] readonly string SlackWebhook; diff --git a/docs/02-fundamentals/05-targets.md b/docs/02-fundamentals/05-targets.md index 9b2fa492d..42c1c7f43 100644 --- a/docs/02-fundamentals/05-targets.md +++ b/docs/02-fundamentals/05-targets.md @@ -207,7 +207,7 @@ class Build : NukeBuild // highlight-start .OnlyWhenDynamic(() => Data.Any()) // highlight-end - .Execute(() => { }); + .Executes(() => { }); } ``` @@ -229,7 +229,7 @@ class Build : NukeBuild .WhenSkipped(DependencyBehavior.Execute) // highlight-end .DependsOn(A) - .Execute(() => { }); + .Executes(() => { }); } ``` @@ -286,7 +286,7 @@ class Build : NukeBuild Target B => _ => _ .DependsOn(A) - .Execute(() => { }); + .Executes(() => { }); } ``` @@ -309,7 +309,7 @@ class Build : NukeBuild .AssuredAfterFailure() // highlight-end .DependsOn(A) - .Execute(() => { }); + .Executes(() => { }); } ``` diff --git a/docs/03-common/07-solution-project-model.md b/docs/03-common/07-solution-project-model.md index 5410610ed..241a70fe1 100644 --- a/docs/03-common/07-solution-project-model.md +++ b/docs/03-common/07-solution-project-model.md @@ -34,7 +34,7 @@ With an instance of the `Solution` type you can **read and write the solution** ```csharp // Gather projects var globalToolProject = Solution.GetProject("Nuke.GlobalTool"); -var testProjects = Solution.GetProjects("*.Tests"); +var testProjects = Solution.GetAllProjects("*.Tests"); // Gather all solution items var allItems = Solution.AllSolutionFolders.SelectMany(x => x.Items); diff --git a/source/Nuke.Common/Tools/EntityFramework/EntityFramework.json b/source/Nuke.Common/Tools/EntityFramework/EntityFramework.json index 99d9b81be..8be6ee9be 100644 --- a/source/Nuke.Common/Tools/EntityFramework/EntityFramework.json +++ b/source/Nuke.Common/Tools/EntityFramework/EntityFramework.json @@ -10,9 +10,9 @@ "customExecutable": true, "tasks": [ { - "help": "The dotnet ef database drop command is used to drop the database.", + "help": "The dotnet-ef database drop command is used to drop the database.", "postfix": "DatabaseDrop", - "definiteArgument": "ef database drop", + "definiteArgument": "database drop", "settingsClass": { "baseClass": "EntityFrameworkSettings", "properties": [ @@ -32,9 +32,9 @@ } }, { - "help": "The dotnet ef database update command is used to update the database to the last migration or to a specified migration.", + "help": "The dotnet-ef database update command is used to update the database to the last migration or to a specified migration.", "postfix": "DatabaseUpdate", - "definiteArgument": "ef database update", + "definiteArgument": "database update", "settingsClass": { "baseClass": "EntityFrameworkSettings", "properties": [ @@ -54,23 +54,23 @@ } }, { - "help": "The dotnet ef dbcontext info command is used to get information about a DbContext type.", + "help": "The dotnet-ef dbcontext info command is used to get information about a DbContext type.", "postfix": "DbContextInfo", - "definiteArgument": "ef dbcontext info", + "definiteArgument": "dbcontext info", "settingsClass": { "baseClass": "EntityFrameworkSettings" } }, { - "help": "The dotnet ef dbcontext list command is used to list available DbContext types.", + "help": "The dotnet-ef dbcontext list command is used to list available DbContext types.", "postfix": "DbContextList", - "definiteArgument": "ef dbcontext list", + "definiteArgument": "dbcontext list", "settingsClass": { "baseClass": "EntityFrameworkSettings" } }, { - "help": "The dotnet ef dbcontext scaffold command is used to generate code for a DbContext and entity types for a database. In order for this command to generate an entity type, the database table must have a primary key.", + "help": "The dotnet-ef dbcontext scaffold command is used to generate code for a DbContext and entity types for a database. In order for this command to generate an entity type, the database table must have a primary key.", "postfix": "DbContextScaffold", "definiteArgument": "ef dbcontext scaffold", "settingsClass": { @@ -164,9 +164,9 @@ } }, { - "help": "The dotnet ef dbcontext script command is used to generate a SQL script from the DbContext, bypassing any migrations.", + "help": "The dotnet-ef dbcontext script command is used to generate a SQL script from the DbContext, bypassing any migrations.", "postfix": "DbContextScript", - "definiteArgument": "ef dbcontext script", + "definiteArgument": "dbcontext script", "settingsClass": { "baseClass": "EntityFrameworkSettings", "properties": [ @@ -180,9 +180,9 @@ } }, { - "help": "The dotnet ef migrations add command is used to add a new migration.", + "help": "The dotnet-ef migrations add command is used to add a new migration.", "postfix": "MigrationsAdd", - "definiteArgument": "ef migrations add", + "definiteArgument": "migrations add", "settingsClass": { "baseClass": "EntityFrameworkSettings", "properties": [ @@ -208,9 +208,9 @@ } }, { - "help": "The dotnet ef migrations list command is used to list available migrations.", + "help": "The dotnet-ef migrations list command is used to list available migrations.", "postfix": "MigrationsList", - "definiteArgument": "ef migrations list", + "definiteArgument": "migrations list", "settingsClass": { "baseClass": "EntityFrameworkSettings", "properties": [ @@ -230,9 +230,9 @@ } }, { - "help": "The dotnet ef migrations remove command is used to remove the last migration (rolls back the code changes that were done for the migration).", + "help": "The dotnet-ef migrations remove command is used to remove the last migration (rolls back the code changes that were done for the migration).", "postfix": "MigrationsRemove", - "definiteArgument": "ef migrations remove", + "definiteArgument": "migrations remove", "settingsClass": { "baseClass": "EntityFrameworkSettings", "properties": [ @@ -246,9 +246,9 @@ } }, { - "help": "The dotnet ef migrations bundle command is used to create a bundle.", + "help": "The dotnet-ef migrations bundle command is used to create a bundle.", "postfix": "MigrationsBundle", - "definiteArgument": "ef migrations bundle", + "definiteArgument": "migrations bundle", "settingsClass": { "baseClass": "EntityFrameworkSettings", "properties": [ @@ -280,9 +280,9 @@ } }, { - "help": "The dotnet ef migrations script command is used to generate a SQL script from migrations.", + "help": "The dotnet-ef migrations script command is used to generate a SQL script from migrations.", "postfix": "MigrationsScript", - "definiteArgument": "ef migrations script", + "definiteArgument": "migrations script", "settingsClass": { "baseClass": "EntityFrameworkSettings", "properties": [ diff --git a/source/Nuke.Common/Tools/Unity/UnityTasks.cs b/source/Nuke.Common/Tools/Unity/UnityTasks.cs index d6515312f..9f1f1af39 100644 --- a/source/Nuke.Common/Tools/Unity/UnityTasks.cs +++ b/source/Nuke.Common/Tools/Unity/UnityTasks.cs @@ -63,15 +63,27 @@ private static string GetProgramFiles() } private static void PreProcess(ref UnitySettings unitySettings) + { + var projectSettings = (UnityProjectSettings)unitySettings; + PreProcessWithAutoDetect(ref projectSettings); + } + + private static void PreProcess(ref UnityRunTestsSettings unitySettings) + { + var projectSettings = (UnityProjectSettings)unitySettings; + PreProcessWithAutoDetect(ref projectSettings); + } + + private static void PreProcessWithAutoDetect(ref UnityProjectSettings unitySettings) { if (unitySettings.ProjectPath == null) Log.Warning("ProjectPath is not set, using last opened/built project"); DetectUnityVersion(ref unitySettings); - PreProcess(ref unitySettings); + PreProcess(ref unitySettings); } - private static void DetectUnityVersion(ref UnitySettings unitySettings) + private static void DetectUnityVersion(ref UnityProjectSettings unitySettings) { if (unitySettings.HubVersion != null || unitySettings.ProjectPath == null)