Skip to content

Commit 20b5895

Browse files
committed
(build) renamed the release to support branch
1 parent 2332cbd commit 20b5895

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

build/build/Tasks/Test/PublishCoverage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public override bool ShouldRun(BuildContext context)
1212
{
1313
var shouldRun = true;
1414
shouldRun &= context.ShouldRun(context.IsOnWindows, $"{nameof(PublishCoverage)} works only on Windows agents.");
15-
shouldRun &= context.ShouldRun(context.IsOnMainOrReleaseBranchOriginalRepo, $"{nameof(PublishCoverage)} works only for on main or release branch original repository.");
15+
shouldRun &= context.ShouldRun(context.IsOnMainOrSupportBranchOriginalRepo, $"{nameof(PublishCoverage)} works only for on main or release branch original repository.");
1616

1717
return shouldRun;
1818
}

build/common/Utilities/BuildContextBase.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ protected BuildContextBase(ICakeContext context) : base(context)
99

1010
public bool IsOriginalRepo { get; set; }
1111
public bool IsMainBranch { get; set; }
12-
public bool IsReleaseBranch { get; set; }
12+
public bool IsSupportBranch { get; set; }
1313
public bool IsPullRequest { get; set; }
1414
public bool IsTagged { get; set; }
1515
public bool IsLocalBuild { get; set; }
@@ -18,7 +18,7 @@ protected BuildContextBase(ICakeContext context) : base(context)
1818
public bool IsOnWindows { get; set; }
1919
public bool IsOnLinux { get; set; }
2020
public bool IsOnMacOS { get; set; }
21-
public bool IsOnMainOrReleaseBranchOriginalRepo => !IsLocalBuild && IsOriginalRepo && (IsMainBranch || IsReleaseBranch) && !IsPullRequest;
22-
public bool IsStableRelease => IsOnMainOrReleaseBranchOriginalRepo && IsTagged;
23-
public bool IsPreRelease => IsOnMainOrReleaseBranchOriginalRepo && !IsTagged;
21+
public bool IsOnMainOrSupportBranchOriginalRepo => !IsLocalBuild && IsOriginalRepo && (IsMainBranch || IsSupportBranch) && !IsPullRequest;
22+
public bool IsStableRelease => IsOnMainOrSupportBranchOriginalRepo && IsTagged;
23+
public bool IsPreRelease => IsOnMainOrSupportBranchOriginalRepo && !IsTagged;
2424
}

build/common/Utilities/BuildLifetimeBase.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public override void Setup(T context)
1515
context.IsPullRequest = buildSystem.IsPullRequest;
1616
context.IsOriginalRepo = context.IsOriginalRepo();
1717
context.IsMainBranch = context.IsMainBranch();
18-
context.IsReleaseBranch = context.IsReleaseBranch();
18+
context.IsSupportBranch = context.IsSupportBranch();
1919
context.IsTagged = context.IsTagged();
2020

2121
context.IsOnWindows = context.IsRunningOnWindows();
@@ -39,7 +39,7 @@ public override void Teardown(T context, ITeardownContext info)
3939
context.Information("Pull Request: {0}", context.IsPullRequest);
4040
context.Information("Original Repo: {0}", context.IsOriginalRepo);
4141
context.Information("Main Branch: {0}", context.IsMainBranch);
42-
context.Information("Release Branch: {0}", context.IsReleaseBranch);
42+
context.Information("Support Branch: {0}", context.IsSupportBranch);
4343
context.Information("Tagged: {0}", context.IsTagged);
4444

4545
context.Information("Finished running tasks.");
@@ -62,7 +62,7 @@ protected void LogBuildInformation(T context)
6262
context.Information("Pull Request: {0}", context.IsPullRequest);
6363
context.Information("Original Repo: {0}", context.IsOriginalRepo);
6464
context.Information("Main Branch: {0}", context.IsMainBranch);
65-
context.Information("Release Branch: {0}", context.IsReleaseBranch);
65+
context.Information("Support Branch: {0}", context.IsSupportBranch);
6666
context.Information("Tagged: {0}", context.IsTagged);
6767
}
6868
}

build/common/Utilities/ContextExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ public static bool IsMainBranch(this ICakeContext context)
8080
return !string.IsNullOrWhiteSpace(repositoryBranch) && StringComparer.OrdinalIgnoreCase.Equals("main", repositoryBranch);
8181
}
8282

83-
public static bool IsReleaseBranch(this ICakeContext context)
83+
public static bool IsSupportBranch(this ICakeContext context)
8484
{
8585
var repositoryBranch = GetBranchName(context);
8686

8787
context.Information("Repository Branch: {0}", repositoryBranch);
8888

89-
return !string.IsNullOrWhiteSpace(repositoryBranch) && repositoryBranch.StartsWith("release/", StringComparison.OrdinalIgnoreCase);
89+
return !string.IsNullOrWhiteSpace(repositoryBranch) && repositoryBranch.StartsWith("suppoer/", StringComparison.OrdinalIgnoreCase);
9090
}
9191

9292
public static bool IsTagged(this ICakeContext context)

build/publish/Tasks/PublishNuget.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public override bool ShouldRun(BuildContext context)
2626
public override void Run(BuildContext context)
2727
{
2828
// publish to github packages for commits on main and on original repo
29-
if (context.IsGitHubActionsBuild && context.IsOnMainOrReleaseBranchOriginalRepo)
29+
if (context.IsGitHubActionsBuild && context.IsOnMainOrSupportBranchOriginalRepo)
3030
{
3131
var apiKey = context.Credentials?.GitHub?.Token;
3232
if (string.IsNullOrEmpty(apiKey))

0 commit comments

Comments
 (0)