From 2275fe49c0e2cbe5ab808274c60674278a1408e9 Mon Sep 17 00:00:00 2001 From: Gary Ewan Park Date: Tue, 7 Jul 2020 20:46:58 +0100 Subject: [PATCH 1/4] (maint) Ignore files on Mac --- .gitignore | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8b90410e..31b2aa8b 100644 --- a/.gitignore +++ b/.gitignore @@ -264,4 +264,8 @@ docs/input/tasks/* # Wyam related docs/config.wyam.dll docs/config.wyam.hash -docs/config.wyam.packages.xml \ No newline at end of file +docs/config.wyam.packages.xml + +*.orig + +.DS_Store \ No newline at end of file From b7b53bb404a895891aa5a9a5db9f242e5f01f0fa Mon Sep 17 00:00:00 2001 From: Gary Ewan Park Date: Tue, 7 Jul 2020 20:49:32 +0100 Subject: [PATCH 2/4] (maint) Remove whitespace --- Cake.Recipe/Content/testing.cake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cake.Recipe/Content/testing.cake b/Cake.Recipe/Content/testing.cake index 51c9f28f..f24844b1 100644 --- a/Cake.Recipe/Content/testing.cake +++ b/Cake.Recipe/Content/testing.cake @@ -214,10 +214,10 @@ BuildParameters.Tasks.DotNetCoreTestTask = Task("DotNetCore-Test") BuildParameters.Tasks.IntegrationTestTask = Task("Run-Integration-Tests") .WithCriteria(() => BuildParameters.ShouldRunIntegrationTests) .IsDependentOn("Default") - .Does(() => + .Does(() => { CakeExecuteScript(BuildParameters.IntegrationTestScriptPath, - new CakeSettings + new CakeSettings { Arguments = new Dictionary { From bb1047a9fa63843ec526298ac95d131fa474d674 Mon Sep 17 00:00:00 2001 From: Gary Ewan Park Date: Tue, 7 Jul 2020 21:09:46 +0100 Subject: [PATCH 3/4] (GH-528) Update Teardown method When running integration tests, messages shouldn't be sent out when the execution completes. These publishing messages are only intended for the main build exection. --- Cake.Recipe/Content/build.cake | 13 +++++++++++-- Cake.Recipe/Content/parameters.cake | 8 ++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Cake.Recipe/Content/build.cake b/Cake.Recipe/Content/build.cake index a6d54433..dffdb699 100644 --- a/Cake.Recipe/Content/build.cake +++ b/Cake.Recipe/Content/build.cake @@ -50,7 +50,14 @@ Teardown(context => if(context.Successful) { - if(!BuildParameters.IsLocalBuild && !BuildParameters.IsPullRequest && BuildParameters.IsMainRepository && (BuildParameters.IsMasterBranch || ((BuildParameters.IsReleaseBranch || BuildParameters.IsHotFixBranch) && BuildParameters.ShouldNotifyBetaReleases)) && BuildParameters.IsTagged) + if(!BuildParameters.IsLocalBuild && + !BuildParameters.IsPullRequest && + BuildParameters.IsMainRepository && + (BuildParameters.IsMasterBranch || + ((BuildParameters.IsReleaseBranch || BuildParameters.IsHotFixBranch) + && BuildParameters.ShouldNotifyBetaReleases)) && + BuildParameters.IsTagged && + !BuildParameters.IsRunningIntegrationTests) { if(BuildParameters.CanPostToTwitter && BuildParameters.ShouldPostToTwitter) { @@ -70,7 +77,9 @@ Teardown(context => } else { - if(!BuildParameters.IsLocalBuild && BuildParameters.IsMainRepository) + if(!BuildParameters.IsLocalBuild && + BuildParameters.IsMainRepository && + !BuildParameters.IsRunningIntegrationTests) { if(BuildParameters.CanPostToSlack && BuildParameters.ShouldPostToSlack) { diff --git a/Cake.Recipe/Content/parameters.cake b/Cake.Recipe/Content/parameters.cake index f7533d2e..98a68053 100644 --- a/Cake.Recipe/Content/parameters.cake +++ b/Cake.Recipe/Content/parameters.cake @@ -30,6 +30,14 @@ public static class BuildParameters public static string MasterBranchName { get; private set; } public static string DevelopBranchName { get; private set; } + public static string IsRunningIntegrationTests + { + get + { + return string.Equals(BuildParameters.Target, "Run-Integration-Tests", StringComparison.OrdinalIgnoreCase) + } + } + public static string GitterMessage { get From 111bd69735af85cd755f81ddec77da1fd7964589 Mon Sep 17 00:00:00 2001 From: Gary Ewan Park Date: Tue, 14 Jul 2020 19:22:53 +0100 Subject: [PATCH 4/4] (GH-528) Fix syntax errors --- Cake.Recipe/Content/parameters.cake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cake.Recipe/Content/parameters.cake b/Cake.Recipe/Content/parameters.cake index 98a68053..2355834a 100644 --- a/Cake.Recipe/Content/parameters.cake +++ b/Cake.Recipe/Content/parameters.cake @@ -30,11 +30,11 @@ public static class BuildParameters public static string MasterBranchName { get; private set; } public static string DevelopBranchName { get; private set; } - public static string IsRunningIntegrationTests + public static bool IsRunningIntegrationTests { get { - return string.Equals(BuildParameters.Target, "Run-Integration-Tests", StringComparison.OrdinalIgnoreCase) + return string.Equals(BuildParameters.Target, "Run-Integration-Tests", StringComparison.OrdinalIgnoreCase); } }