|
@ -1,8 +1,9 @@ |
|
|
|
|
|
#!/bin/bash |
|
|
set -e |
|
|
set -e |
|
|
|
|
|
|
|
|
if [[ -z $1 ]]; then |
|
|
if [[ -z $1 ]]; then |
|
|
echo "Enter new version: " |
|
|
echo "Enter new version: " |
|
|
read VERSION |
|
|
read -r VERSION |
|
|
else |
|
|
else |
|
|
VERSION=$1 |
|
|
VERSION=$1 |
|
|
fi |
|
|
fi |
|
@ -32,23 +33,24 @@ if [[ $REPLY =~ ^[Yy]$ ]]; then |
|
|
VERSION=$VERSION npm run build |
|
|
VERSION=$VERSION npm run build |
|
|
|
|
|
|
|
|
# update packages |
|
|
# update packages |
|
|
cd packages/vue-template-compiler |
|
|
# using subshells to avoid having to cd back |
|
|
npm version $VERSION |
|
|
( ( cd packages/vue-template-compiler |
|
|
|
|
|
npm version "$VERSION" |
|
|
if [[ -z $RELEASE_TAG ]]; then |
|
|
if [[ -z $RELEASE_TAG ]]; then |
|
|
npm publish |
|
|
npm publish |
|
|
else |
|
|
else |
|
|
npm publish --tag $RELEASE_TAG |
|
|
npm publish --tag "$RELEASE_TAG" |
|
|
fi |
|
|
fi |
|
|
cd - |
|
|
) |
|
|
|
|
|
|
|
|
cd packages/vue-server-renderer |
|
|
cd packages/vue-server-renderer |
|
|
npm version $VERSION |
|
|
npm version "$VERSION" |
|
|
if [[ -z $RELEASE_TAG ]]; then |
|
|
if [[ -z $RELEASE_TAG ]]; then |
|
|
npm publish |
|
|
npm publish |
|
|
else |
|
|
else |
|
|
npm publish --tag $RELEASE_TAG |
|
|
npm publish --tag "$RELEASE_TAG" |
|
|
fi |
|
|
fi |
|
|
cd - |
|
|
) |
|
|
|
|
|
|
|
|
# commit |
|
|
# commit |
|
|
git add -A |
|
|
git add -A |
|
@ -63,14 +65,14 @@ if [[ $REPLY =~ ^[Yy]$ ]]; then |
|
|
# generate release note |
|
|
# generate release note |
|
|
npm run release:note |
|
|
npm run release:note |
|
|
# tag version |
|
|
# tag version |
|
|
npm version $VERSION --message "build: release $VERSION" |
|
|
npm version "$VERSION" --message "build: release $VERSION" |
|
|
|
|
|
|
|
|
# publish |
|
|
# publish |
|
|
git push origin refs/tags/v$VERSION |
|
|
git push origin refs/tags/v"$VERSION" |
|
|
git push |
|
|
git push |
|
|
if [[ -z $RELEASE_TAG ]]; then |
|
|
if [[ -z $RELEASE_TAG ]]; then |
|
|
npm publish |
|
|
npm publish |
|
|
else |
|
|
else |
|
|
npm publish --tag $RELEASE_TAG |
|
|
npm publish --tag "$RELEASE_TAG" |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
|