1
0
mirror of https://gitee.com/vant-contrib/vant.git synced 2025-04-23 18:00:27 +08:00
neverland 66f3aac389
build: update lint-commit-msg rules ()
* build: update lint-commit-msg rules

* build: update release.sh
2019-08-21 10:06:54 +08:00

29 lines
536 B
Bash

#!/usr/bin/env sh
set -e
echo "Enter release version: "
read VERSION
read -p "Releasing $VERSION - are you sure? (y/n)" -n 1 -r
echo # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
# build
npm version $VERSION --no-git-tag-version
VERSION=$VERSION npm run build:lib
# commit
git tag v$VERSION
git commit -am "build: release $VERSION"
# publish
git push origin dev
git push origin refs/tags/v$VERSION
if [[ $VERSION =~ [beta] ]]
then
npm publish --tag beta
else
npm publish
fi
fi