mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Add rollback script, move auto-changelog script (#6252)
This commit is contained in:
parent
00c52d537c
commit
823007121d
35
development/rollback.sh
Executable file
35
development/rollback.sh
Executable 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
|
@ -18,10 +18,10 @@ Simply follow the steps in [the publishing guide](./publishing.md).
|
|||||||
|
|
||||||
### Prepare Rollback Release
|
### Prepare Rollback Release
|
||||||
|
|
||||||
1. Check out the tagged commit for the release before this new release.
|
1. Be on the new risky version branch.
|
||||||
2. Increment the version over the new release by one patch.
|
2. Run `npm run rollback $ROLLBACK_TARGET_VERSION`.
|
||||||
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.
|
The rollback version will now be a branch and tag on the origin.
|
||||||
|
|
||||||
### Roll the normal release out
|
### Roll the normal release out
|
||||||
|
|
||||||
|
@ -36,7 +36,8 @@
|
|||||||
"announce": "node development/announcer.js",
|
"announce": "node development/announcer.js",
|
||||||
"version:bump": "node development/run-version-bump.js",
|
"version:bump": "node development/run-version-bump.js",
|
||||||
"storybook": "start-storybook -p 6006 -c .storybook",
|
"storybook": "start-storybook -p 6006 -c .storybook",
|
||||||
"update-changelog": "./auto-changelog.sh"
|
"update-changelog": "./development/auto-changelog.sh",
|
||||||
|
"rollback": "./development/rollback.sh"
|
||||||
},
|
},
|
||||||
"browserify": {
|
"browserify": {
|
||||||
"transform": [
|
"transform": [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user