mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-09-06 15:59:45 +08:00
[Build] optimize release process
This commit is contained in:
parent
31d49c63c2
commit
26a22fe48f
@ -2,7 +2,7 @@ const Components = require('./get-components')();
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const uppercamelize = require('uppercamelcase');
|
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';
|
const tips = '// This file is auto gererated by build/bin/build-entry.js';
|
||||||
|
|
||||||
function buildVantEntry() {
|
function buildVantEntry() {
|
||||||
|
@ -10,22 +10,19 @@ read -p "Releasing $VERSION - are you sure? (y/n)" -n 1 -r
|
|||||||
echo # (optional) move to a new line
|
echo # (optional) move to a new line
|
||||||
if [[ $REPLY =~ ^[Yy]$ ]]
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
then
|
then
|
||||||
echo "Releasing $VERSION ..."
|
|
||||||
|
|
||||||
# build
|
# build
|
||||||
VERSION=$VERSION npm run dist
|
npm run dist
|
||||||
|
|
||||||
# publish vant-css
|
# publish vant-css
|
||||||
echo "Releasing vant-css $VERSION ..."
|
echo "Releasing vant-css $VERSION ..."
|
||||||
cd packages/vant-css
|
cd packages/vant-css
|
||||||
npm version $VERSION --message "[release] $VERSION"
|
npm version $VERSION
|
||||||
npm publish
|
npm publish
|
||||||
cd ../..
|
cd ../..
|
||||||
|
|
||||||
# commit
|
# commit
|
||||||
git add -A
|
npm version $VERSION --no-git-tag-version
|
||||||
git commit -m "[build] $VERSION"
|
git commit -am "[release] $VERSION"
|
||||||
npm version $VERSION --message "[release] $VERSION"
|
|
||||||
|
|
||||||
# publish
|
# publish
|
||||||
git push origin master
|
git push origin master
|
||||||
|
Loading…
x
Reference in New Issue
Block a user