1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

Add rollback script, move auto-changelog script (#6252)

This commit is contained in:
Dan Finlay 2019-03-20 05:18:50 -07:00 committed by Whymarrh Whitby
parent 00c52d537c
commit 823007121d
4 changed files with 41 additions and 5 deletions

35
development/rollback.sh Executable file
View File

@ -0,0 +1,35 @@
#! /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
npm run version:bump patch
# Store the new version name
NEW_VERSION=$(cat app/manifest.json | jq -r .version)
# 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

View File

@ -18,10 +18,10 @@ Simply follow the steps in [the publishing guide](./publishing.md).
### Prepare Rollback Release
1. Check out the tagged commit for the release before this new release.
2. Increment the version over the new release by one patch.
3. Merge the changelog of the new release into this branch, and make its own changelog refer to rolling back those changes.
4. Push to the main repository and pull request against `master` prominently noting this is a `DO NOT MERGE` rollback pull request.
1. Be on the new risky version branch.
2. Run `npm run rollback $ROLLBACK_TARGET_VERSION`.
The rollback version will now be a branch and tag on the origin.
### Roll the normal release out

View File

@ -36,7 +36,8 @@
"announce": "node development/announcer.js",
"version:bump": "node development/run-version-bump.js",
"storybook": "start-storybook -p 6006 -c .storybook",
"update-changelog": "./auto-changelog.sh"
"update-changelog": "./development/auto-changelog.sh",
"rollback": "./development/rollback.sh"
},
"browserify": {
"transform": [