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
Danica Shen f5e2183a7f
feat(17494): beta build trigger in release branch and cleanup (#17749)
* feat(17494): test separate commit triggered build

* feat(17493): keep consistent commit message

* feat(17493): use trim to get rid of white space in branch name

* feat(17493): bring back some pipelines

* Version v10.25.0-beta.0

* ERC1155 Import & Dapp interaction E2E tests (#17885)

* feat(17494): test separate commit triggered build

* feat(17493): remove testing beta commit in package.json

---------

Co-authored-by: Thomas Huang <tmashuang@users.noreply.github.com>
2023-03-04 12:51:04 +00:00

35 lines
837 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'
current_commit_msg=$(git show -s --format='%s' HEAD)
if [[ $current_commit_msg =~ Version[[:space:]](v[[:digit:]]+.[[:digit:]]+.[[:digit:]]+[-]beta.[[:digit:]]) ]]
then
printf '%s\n' 'manifest version will not be updated for beta commit'
# escape version update everytime a new change pushed to release branch
else
version="${CIRCLE_BRANCH/Version-v/}"
yarn version "${version}"
fi
if [[ -z $(git status --porcelain) ]]
then
printf '%s\n' 'App manifest version already set'
fi