Skip to content

Commit

Permalink
Merge branch 'hotfix/0.28.3'
Browse files Browse the repository at this point in the history
* hotfix/0.28.3:
  (#154) Verify PowerShell scripts on develop branch
  • Loading branch information
gep13 committed May 17, 2024
2 parents 173591a + ae80816 commit 7fe3b3d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion Chocolatey.Cake.Recipe/Content/parameters.cake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ public enum BranchType
HotFix,
Release,
Develop,
Master
Master,
Support
}

public static class BuildParameters
Expand Down Expand Up @@ -870,6 +871,10 @@ public static class BuildParameters
{
BranchType = BranchType.HotFix;
}
else if (branchName != null && branchName.StartsWith("support", StringComparison.OrdinalIgnoreCase))
{
BranchType = BranchType.Support;
}
else
{
BranchType = BranchType.Unknown;
Expand Down
2 changes: 1 addition & 1 deletion Chocolatey.Cake.Recipe/Content/sign.cake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
BuildParameters.Tasks.VerifyPowerShellScriptsTask = Task("Verify-PowerShellScripts")
.WithCriteria(() => BuildParameters.BuildAgentOperatingSystem == PlatformFamily.Windows, "Skipping due to not running on Windows")
.WithCriteria(() => !BuildParameters.IsPullRequest, "Skipping because current build is from a Pull Request")
.WithCriteria(() => BuildParameters.BranchType == BranchType.Master || BuildParameters.BranchType == BranchType.Release || BuildParameters.BranchType == BranchType.HotFix, "Skipping because this is not a releasable branch")
.WithCriteria(() => BuildParameters.BranchType == BranchType.Master || BuildParameters.BranchType == BranchType.Release || BuildParameters.BranchType == BranchType.HotFix || BuildParameters.BranchType == BranchType.Support || BuildParameters.BranchType == BranchType.Develop, "Skipping because this is not a 'main' branch, i.e. master, develop, release, hotfix, or support, where scripts need to be verified.")
.WithCriteria(() => BuildParameters.ShouldVerifyPowerShellScripts, "Skipping since verifying PowerShell scripts has been disabled")
.Does(() =>
{
Expand Down

0 comments on commit 7fe3b3d

Please sign in to comment.