mirror of
https://github.com/twitter/twemoji.git
synced 2024-06-15 03:35:16 +00:00
Added deploy script to push built files to gh-pages
This commit is contained in:
parent
57d4cdb63b
commit
feee6da8b1
@ -35,7 +35,8 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "./scripts/generate",
|
"build": "./scripts/generate",
|
||||||
"test": "phantomjs ./src/test/testrunner.js",
|
"test": "phantomjs ./src/test/testrunner.js",
|
||||||
"prepublish": "run-s build test"
|
"deploy": "./scripts/deploy.sh gh-pages-new 12.0.4",
|
||||||
|
"prepublish": "run-s version build test deploy"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"twemoji-parser": "12.0.0"
|
"twemoji-parser": "12.0.0"
|
||||||
|
23
release.sh
23
release.sh
@ -1,23 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
root=$(
|
|
||||||
cd $(dirname $0)
|
|
||||||
/bin/pwd
|
|
||||||
)
|
|
||||||
|
|
||||||
dir=$1
|
|
||||||
out=/tmp/school.$$
|
|
||||||
|
|
||||||
trap "rm -fr $out" 0 1 2
|
|
||||||
|
|
||||||
git clone $root/.git $out
|
|
||||||
cd $out
|
|
||||||
git remote set-url origin git@github.com:twitter/scala_school.git
|
|
||||||
git fetch
|
|
||||||
git checkout gh-pages
|
|
||||||
cd $root
|
|
||||||
cp -r $dir/* $out/
|
|
||||||
cd $out
|
|
||||||
git add .
|
|
||||||
git commit -am"publish by $USER"
|
|
||||||
git push origin gh-pages
|
|
17
scripts/deploy.sh
Executable file
17
scripts/deploy.sh
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
ROOT=$(
|
||||||
|
cd $(dirname $0)/..
|
||||||
|
/bin/pwd
|
||||||
|
)
|
||||||
|
OUTPUT="$ROOT/dist/"
|
||||||
|
PUBLISH_BRANCH=$1
|
||||||
|
VERSION=$2
|
||||||
|
|
||||||
|
git fetch --all
|
||||||
|
git add -f $OUT
|
||||||
|
git checkout $PUBLISH_BRANCH
|
||||||
|
git pull origin $PUBLISH_BRANCH
|
||||||
|
git mv -f $OUT $VERSION
|
||||||
|
git commit -m "Update the Twemoji project and push to $PUBLISH_BRANCH"
|
||||||
|
git push origin $PUBLISH_BRANCH
|
Loading…
Reference in New Issue
Block a user