vant-weapp/scripts/release.sh
Yao e4dfc9e48c
[new feature] Layout: 新增 layout 组件 (#43)
* change example dir

* Update README.md

更新预览教程

* 新增 layout 组件

* exclude example

* change .wxss -> .pcss

* 脚本目录更名为 scripts
2017-10-31 17:41:31 +08:00

32 lines
565 B
Bash

git checkout master
#!/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
echo "Releasing $VERSION ..."
# build
npm run components
# commit build
git add -A
git commit -m "[build] $VERSION"
# commit
npm version $VERSION --message "[release] $VERSION"
# publish
echo "publishing git..."
git push origin master
git push origin refs/tags/v$VERSION
echo "publishing npm..."
npm publish
fi