Skip to content

Commit

Permalink
Merge a13c6ce into 6429685
Browse files Browse the repository at this point in the history
  • Loading branch information
wemeetagain authored Feb 27, 2023
2 parents 6429685 + a13c6ce commit 90fb4c9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions scripts/release/create_rc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,16 @@ if (!semver.gt(versionMMP, currentVersion)) {
const currentBranch = getCurrentBranch();
if (semver.patch(versionMMP) === 0) {
// New version release candidate
// This script must be run from unstable branch
if (currentBranch !== UNSTABLE_BRANCH) {
// This script must be run from unstable or stable branch
if (currentBranch === STABLE_BRANCH) {
console.warn(`Warning: Creating a new release from branch ${STABLE_BRANCH}. In most cases, a new release should be based off branch ${UNSTABLE_BRANCH} and only hotfixes should be based off branch ${STABLE_BRANCH}`);
assertCommitExistsInBranch(commit, STABLE_BRANCH);
} else if (currentBranch === UNSTABLE_BRANCH) {
assertCommitExistsInBranch(commit, UNSTABLE_BRANCH);
} else {
throw Error(`Must be run in branch '${UNSTABLE_BRANCH}' but is in '${currentBranch}'`);
}

assertCommitExistsInBranch(commit, UNSTABLE_BRANCH);
} else {
// Hot-fix release candidate
// This script must be run from unstable branch
Expand Down

0 comments on commit 90fb4c9

Please sign in to comment.