mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-25 03:20:23 +01:00
Update the changelog when creating an RC (#10795)
The changelog will now be automatically updated when a release branch is created. A new release header along with changelog entries for any new commits will be added. Note that this changelog will still need to be manually cleaned up, but it's one less manual step at least. The old Bash script for adding a new release header to the changelog has been removed, as that functionality is now built into the changelog update script. A new script has been added to commit any changes made to the manifest and changelog. This step used to happen at the end of the bump manifest version script, but now the changelog update relies upon the manifest version bump happening first, so it needed to be re-ordered. The changes should only be committed on the first run of the branch, as it's contingent upon the manifest changing (due to the version bump). Further changelog updates won't trigger new automatic commits.
This commit is contained in:
parent
13862cbc1b
commit
687803539f
@ -123,12 +123,18 @@ jobs:
|
||||
- checkout
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run:
|
||||
name: Bump manifest version
|
||||
command: .circleci/scripts/release-bump-manifest-version.sh
|
||||
- run:
|
||||
name: Update changelog
|
||||
command: yarn update-changelog
|
||||
- run:
|
||||
name: Commit changes
|
||||
command: .circleci/scripts/release-commit-version-bump.sh
|
||||
- run:
|
||||
name: Create GitHub Pull Request for version
|
||||
command: |
|
||||
.circleci/scripts/release-bump-changelog-version.sh
|
||||
.circleci/scripts/release-bump-manifest-version.sh
|
||||
.circleci/scripts/release-create-release-pr.sh
|
||||
command: .circleci/scripts/release-create-release-pr.sh
|
||||
|
||||
prep-deps:
|
||||
executor: node-browsers
|
||||
|
@ -26,14 +26,4 @@ yarn prettier --write app/manifest/_base.json
|
||||
if [[ -z $(git status --porcelain) ]]
|
||||
then
|
||||
printf '%s\n' 'App manifest version already set'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
git \
|
||||
-c user.name='MetaMask Bot' \
|
||||
-c user.email='metamaskbot@users.noreply.github.com' \
|
||||
commit --message "${CIRCLE_BRANCH/-/ }" \
|
||||
CHANGELOG.md app/manifest/_base.json
|
||||
|
||||
repo_slug="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME"
|
||||
git push "https://$GITHUB_TOKEN_USER:$GITHUB_TOKEN@github.com/$repo_slug" "$CIRCLE_BRANCH"
|
||||
|
34
.circleci/scripts/release-commit-version-bump.sh
Executable file
34
.circleci/scripts/release-commit-version-bump.sh
Executable file
@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -u
|
||||
set -o pipefail
|
||||
|
||||
if [[ "${CI:-}" != 'true' ]]
|
||||
then
|
||||
printf '%s\n' 'CI environment variable must be set to true'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "${CIRCLECI:-}" != 'true' ]]
|
||||
then
|
||||
printf '%s\n' 'CIRCLECI environment variable must be set to true'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
printf '%s\n' 'Commit the manifest version and changelog if the manifest has changed'
|
||||
|
||||
if git diff --quiet app/manifest/_base.json;
|
||||
then
|
||||
printf '%s\n' 'No manifest changes to commit'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
git \
|
||||
-c user.name='MetaMask Bot' \
|
||||
-c user.email='metamaskbot@users.noreply.github.com' \
|
||||
commit --message "${CIRCLE_BRANCH/-/ }" \
|
||||
CHANGELOG.md app/manifest/_base.json
|
||||
|
||||
repo_slug="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME"
|
||||
git push "https://$GITHUB_TOKEN_USER:$GITHUB_TOKEN@github.com/$repo_slug" "$CIRCLE_BRANCH"
|
Loading…
Reference in New Issue
Block a user