Skip to content

Commit

Permalink
Update build scripts to account for master branch having been renamed…
Browse files Browse the repository at this point in the history
… to main
  • Loading branch information
Jericho committed Jun 30, 2020
1 parent aab2544 commit dbcb629
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
mode: ContinuousDelivery
branches:
master:
regex: main
mode: ContinuousDelivery
tag:
increment: Patch
prevent-increment-of-merged-branch-version: true
track-merge-target: false
feature:
regex: feature(s)?[/-]
mode: ContinuousDeployment
Expand Down
6 changes: 3 additions & 3 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ var versionInfo = GitVersion(new GitVersionSettings() { OutputType = GitVersionO
var milestone = versionInfo.MajorMinorPatch;
var cakeVersion = typeof(ICakeContext).Assembly.GetName().Version.ToString();
var isLocalBuild = BuildSystem.IsLocalBuild;
var isMainBranch = StringComparer.OrdinalIgnoreCase.Equals("master", BuildSystem.AppVeyor.Environment.Repository.Branch);
var isMainBranch = StringComparer.OrdinalIgnoreCase.Equals("main", BuildSystem.AppVeyor.Environment.Repository.Branch);
var isMainRepo = StringComparer.OrdinalIgnoreCase.Equals($"{gitHubRepoOwner}/{gitHubRepo}", BuildSystem.AppVeyor.Environment.Repository.Name);
var isPullRequest = BuildSystem.AppVeyor.Environment.PullRequest.IsPullRequest;
var isTagged = (
Expand Down Expand Up @@ -335,7 +335,7 @@ Task("Create-Release-Notes")
Name = milestone,
Milestone = milestone,
Prerelease = false,
TargetCommitish = "master"
TargetCommitish = "main"
};

if (!string.IsNullOrEmpty(gitHubToken))
Expand Down Expand Up @@ -364,7 +364,7 @@ Task("Publish-GitHub-Release")
Name = milestone,
Milestone = milestone,
Prerelease = false,
TargetCommitish = "master"
TargetCommitish = "main"
};

if (!string.IsNullOrEmpty(gitHubToken))
Expand Down

0 comments on commit dbcb629

Please sign in to comment.