1
0
mirror of https://github.com/twitter/twemoji.git synced 2024-12-26 00:15:54 +00:00

Stash version changes before switching branches to deploy

This commit is contained in:
Nathan Downs 2019-07-01 15:59:33 -07:00
parent 45eb9c29ce
commit 2e72acdb16
2 changed files with 10 additions and 5 deletions

View File

@ -34,9 +34,9 @@
"unpkg": "./dist/twemoji.min.js",
"scripts": {
"build": "./scripts/generate",
"deploy": "./scripts/deploy.sh gh-pages",
"test": "phantomjs ./src/test/testrunner.js",
"prepublishOnly": "run-s build test",
"postpublish": "./scripts/deploy.sh gh-pages"
"prepublishOnly": "run-s build test deploy"
},
"dependencies": {
"fs-extra": "^8.0.1",

View File

@ -10,9 +10,12 @@ PUBLISH_BRANCH=$1
VERSION=$(cat package.json | jq -r .version)
git fetch --all
git stash
git checkout $PUBLISH_BRANCH
git pull origin $PUBLISH_BRANCH
cd "v/"
pushd "v/"
# If the folder already exists we want to repalce it
if [ -d $VERSION ]; then
rm -r $VERSION
@ -22,6 +25,8 @@ mv -f $DIST $VERSION
git add $VERSION
git commit -q -m "Publish v$VERSION"
git push origin $PUBLISH_BRANCH
# Return to your working branch
popd
git checkout -
cd $ROOT
git stash apply