1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 11:22:43 +02:00
metamask-extension/.circleci/scripts/release-bump-manifest-version.sh
Mark Stacey 687803539f
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.
2021-04-02 18:41:51 -02:30

30 lines
666 B
Bash
Executable File

#!/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' 'Updating the manifest version if needed'
version="${CIRCLE_BRANCH/Version-v/}"
updated_manifest="$(jq ".version = \"$version\"" app/manifest/_base.json)"
printf '%s\n' "$updated_manifest" > app/manifest/_base.json
yarn prettier --write app/manifest/_base.json
if [[ -z $(git status --porcelain) ]]
then
printf '%s\n' 'App manifest version already set'
fi