2019-06-26 02:24:28 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
ROOT=$(
|
|
|
|
cd $(dirname $0)/..
|
|
|
|
/bin/pwd
|
|
|
|
)
|
2019-06-26 02:55:51 +00:00
|
|
|
OUT="$ROOT/dist/"
|
2019-06-26 02:24:28 +00:00
|
|
|
PUBLISH_BRANCH=$1
|
|
|
|
VERSION=$2
|
|
|
|
|
|
|
|
git fetch --all
|
|
|
|
git add -f $OUT
|
|
|
|
git checkout $PUBLISH_BRANCH
|
|
|
|
git pull origin $PUBLISH_BRANCH
|
2019-06-26 03:46:51 +00:00
|
|
|
if [ -d $VERSION ]; then
|
|
|
|
rm -r $VERSION
|
|
|
|
if
|
2019-06-26 02:24:28 +00:00
|
|
|
git mv -f $OUT $VERSION
|
2019-06-26 03:28:16 +00:00
|
|
|
git commit -q -m "Update the Twemoji project and push to $PUBLISH_BRANCH"
|
2019-06-26 03:35:06 +00:00
|
|
|
git push origin $PUBLISH_BRANCH
|
|
|
|
# Return to your working branch
|
|
|
|
git checkout -
|