[Build] optimize release process

This commit is contained in:
陈嘉涵 2018-05-09 22:30:07 +08:00
parent 31d49c63c2
commit 26a22fe48f
2 changed files with 5 additions and 8 deletions

View File

@ -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() {

View File

@ -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