1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-29 23:58:06 +01:00
metamask-extension/development/rollback.sh
ricky 476274474f
Add shellcheck lint (#7392)
* Add shellcheck lint script

* Add to build

* Add shellcheck lint to main lint task

* Put shellcheck in the right place, hopefully?

* Fix declared multiple executor types

* Add sudo

* Address shellcheck warnings

* Add test-lint-shellcheck

* Add test-lint-shellcheck to workflow

* Use correct lint task

* output version which could be helpful for debugging

* Address PR feedback

* consistency++
2019-11-19 10:46:10 -05:00

36 lines
874 B
Bash
Executable File

#! /bin/bash
[[ -z "$1" ]] && { echo "Rollback version is required!" ; exit 1; }
echo "Rolling back to version $1"
# Checkout branch to increment version
git checkout -b "version-increment-$1"
yarn version:bump patch
# Store the new version name
NEW_VERSION=$(jq -r .version < app/manifest.json)
# Make sure origin tags are loaded
git fetch origin
# check out the rollback branch
git checkout "origin/v$1"
# Create the rollback branch.
git checkout -b "Version-$NEW_VERSION-Rollback-to-$1"
# Set the version files to the next one.
git checkout master CHANGELOG.md
git checkout master app/manifest.json
git commit -m "Version $NEW_VERSION (Rollback to $1)"
# Push the new branch to PR
git push -u origin HEAD
# Create tag and push that up too
git tag "v${NEW_VERSION}"
git push origin "v${NEW_VERSION}"
# Cleanup version branch
git branch -D "version-increment-$1"