From 26a22fe48f905af96d88300d189d4c1b52deffa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Wed, 9 May 2018 22:30:07 +0800 Subject: [PATCH] [Build] optimize release process --- build/bin/build-entry.js | 2 +- build/release.sh | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/build/bin/build-entry.js b/build/bin/build-entry.js index e6ca9e141..6c545ac4b 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 = process.env.VERSION || require('../../package.json').version; +const 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 247684c63..cb1ef3f98 100644 --- a/build/release.sh +++ b/build/release.sh @@ -10,22 +10,19 @@ read -p "Releasing $VERSION - are you sure? (y/n)" -n 1 -r echo # (optional) move to a new line if [[ $REPLY =~ ^[Yy]$ ]] then - echo "Releasing $VERSION ..." - # build - VERSION=$VERSION npm run dist + npm run dist # publish vant-css echo "Releasing vant-css $VERSION ..." cd packages/vant-css - npm version $VERSION --message "[release] $VERSION" + npm version $VERSION npm publish cd ../.. # commit - git add -A - git commit -m "[build] $VERSION" - npm version $VERSION --message "[release] $VERSION" + npm version $VERSION --no-git-tag-version + git commit -am "[release] $VERSION" # publish git push origin master