1
0
mirror of https://github.com/twitter/twemoji.git synced 2024-11-05 02:30:18 +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",
"build": "./scripts/generate",
"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"
},
"dependencies": {

View File

@ -6,7 +6,8 @@ ROOT=$(
)
OUT="$ROOT/dist/"
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 add -f $OUT