diff --git a/package.json b/package.json index 0d7f8af4..f5ce8093 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 09e438f2..d26ab787 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -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