1
0
mirror of https://github.com/twitter/twemoji.git synced 2024-10-01 12:24:23 +00:00

Add automatic version spec in deploy.sh

This commit is contained in:
Alan Velasco 2019-06-26 10:52:13 -07:00
parent 3f2ae0737a
commit 0412b9aae4
2 changed files with 3 additions and 2 deletions

View File

@ -36,7 +36,7 @@
"version": "yarn version", "version": "yarn version",
"build": "./scripts/generate", "build": "./scripts/generate",
"test": "phantomjs ./src/test/testrunner.js", "test": "phantomjs ./src/test/testrunner.js",
"deploy": "./scripts/deploy.sh gh-pages 12.0.4", "deploy": "./scripts/deploy.sh gh-pages",
"prepublish": "run-s version build test deploy" "prepublish": "run-s version build test deploy"
}, },
"dependencies": { "dependencies": {

View File

@ -6,7 +6,8 @@ ROOT=$(
) )
OUT="$ROOT/dist/" OUT="$ROOT/dist/"
PUBLISH_BRANCH=$1 PUBLISH_BRANCH=$1
VERSION=$2 # For this to work, the version specification must be on the second line of package.json
VERSION=$(cat "$ROOT/package.json" | sed '2!d' | egrep -o '[0-9]+\.[0-9]+\.[0-9]+')
git fetch --all git fetch --all
git add -f $OUT git add -f $OUT