Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the changelog when creating an RC #10795

Merged
merged 4 commits into from
Apr 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 0 additions & 10 deletions .circleci/scripts/release-bump-manifest-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 34 additions & 0 deletions .circleci/scripts/release-commit-version-bump.sh
Original file line number Diff line number Diff line change
@@ -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;
rekmarks marked this conversation as resolved.
Show resolved Hide resolved
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"