mirror of
https://github.com/twitter/twemoji.git
synced 2024-12-26 09:18:33 +00:00
Stash version changes before switching branches to deploy
This commit is contained in:
parent
45eb9c29ce
commit
2e72acdb16
@ -34,9 +34,9 @@
|
|||||||
"unpkg": "./dist/twemoji.min.js",
|
"unpkg": "./dist/twemoji.min.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "./scripts/generate",
|
"build": "./scripts/generate",
|
||||||
|
"deploy": "./scripts/deploy.sh gh-pages",
|
||||||
"test": "phantomjs ./src/test/testrunner.js",
|
"test": "phantomjs ./src/test/testrunner.js",
|
||||||
"prepublishOnly": "run-s build test",
|
"prepublishOnly": "run-s build test deploy"
|
||||||
"postpublish": "./scripts/deploy.sh gh-pages"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fs-extra": "^8.0.1",
|
"fs-extra": "^8.0.1",
|
||||||
|
@ -10,9 +10,12 @@ PUBLISH_BRANCH=$1
|
|||||||
VERSION=$(cat package.json | jq -r .version)
|
VERSION=$(cat package.json | jq -r .version)
|
||||||
|
|
||||||
git fetch --all
|
git fetch --all
|
||||||
|
git stash
|
||||||
|
|
||||||
git checkout $PUBLISH_BRANCH
|
git checkout $PUBLISH_BRANCH
|
||||||
git pull origin $PUBLISH_BRANCH
|
git pull origin $PUBLISH_BRANCH
|
||||||
cd "v/"
|
|
||||||
|
pushd "v/"
|
||||||
# If the folder already exists we want to repalce it
|
# If the folder already exists we want to repalce it
|
||||||
if [ -d $VERSION ]; then
|
if [ -d $VERSION ]; then
|
||||||
rm -r $VERSION
|
rm -r $VERSION
|
||||||
@ -22,6 +25,8 @@ mv -f $DIST $VERSION
|
|||||||
git add $VERSION
|
git add $VERSION
|
||||||
git commit -q -m "Publish v$VERSION"
|
git commit -q -m "Publish v$VERSION"
|
||||||
git push origin $PUBLISH_BRANCH
|
git push origin $PUBLISH_BRANCH
|
||||||
# Return to your working branch
|
popd
|
||||||
|
|
||||||
git checkout -
|
git checkout -
|
||||||
cd $ROOT
|
|
||||||
|
git stash apply
|
||||||
|
Loading…
Reference in New Issue
Block a user