diff --git a/build/bin/build-entry.js b/build/bin/build-entry.js index 6c545ac4b..e6ca9e141 100644 --- a/build/bin/build-entry.js +++ b/build/bin/build-entry.js @@ -2,7 +2,7 @@ const Components = require('./get-components')(); const fs = require('fs'); const path = require('path'); const uppercamelize = require('uppercamelcase'); -const version = require('../../package.json').version; +const version = process.env.VERSION || require('../../package.json').version; const tips = '// This file is auto gererated by build/bin/build-entry.js'; function buildVantEntry() { diff --git a/build/release.sh b/build/release.sh index cb1ef3f98..c4a7a3efd 100644 --- a/build/release.sh +++ b/build/release.sh @@ -11,7 +11,7 @@ echo # (optional) move to a new line if [[ $REPLY =~ ^[Yy]$ ]] then # build - npm run dist + VERSION=$VERSION npm run dist # publish vant-css echo "Releasing vant-css $VERSION ..."