1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 11:22:43 +02:00

Add --rc flag to changelog script (#10839)

The changelog script now accepts an `--rc` flag to tell it whether to
add new changes to `Unreleased` or to the header for the current
version.

Previously this was inferred from whether the current version matched
the most recent tag. However this method only works for the first
update. Using a flag simplifies this logic, and makes it possible to
manually re-run this for further updates to a release candidate.
This commit is contained in:
Mark Stacey 2021-04-07 16:47:41 -02:30 committed by GitHub
parent b18161c066
commit 482cbfe929
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 5 deletions

View File

@ -128,7 +128,7 @@ jobs:
command: .circleci/scripts/release-bump-manifest-version.sh
- run:
name: Update changelog
command: yarn update-changelog
command: yarn update-changelog --rc
- run:
name: Commit changes
command: .circleci/scripts/release-commit-version-bump.sh

View File

@ -9,6 +9,17 @@ const runCommand = require('./lib/runCommand');
const URL = 'https://github.com/MetaMask/metamask-extension';
async function main() {
const args = process.argv.slice(2);
let isReleaseCandidate = false;
for (const arg of args) {
if (arg === '--rc') {
isReleaseCandidate = true;
} else {
throw new Error(`Unrecognized argument: ${arg}`);
}
}
await runCommand('git', ['fetch', '--tags']);
const [mostRecentTagCommitHash] = await runCommand('git', [
@ -100,10 +111,6 @@ async function main() {
return;
}
// remove the "v" prefix
const mostRecentVersion = mostRecentTag.slice(1);
const isReleaseCandidate = mostRecentVersion !== version;
const versionHeader = `## [${version}]`;
const escapedVersionHeader = escapeRegExp(versionHeader);
const currentDevelopBranchHeader = '## [Unreleased]';