element/build/release.sh

39 lines
748 B
Bash
Raw Normal View History

2016-11-18 11:14:56 +00:00
git checkout master
git merge dev
2016-11-18 01:21:52 +00:00
#!/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
VERSION=$VERSION npm run dist
2016-11-01 14:51:03 +00:00
# publish theme
echo "Releasing theme-default $VERSION ..."
cd packages/theme-default
npm version $VERSION --message "[release] $VERSION"
npm publish
2016-11-01 14:51:03 +00:00
cd ../..
# commit
git add -A
git commit -m "[build] $VERSION"
npm version $VERSION --message "[release] $VERSION"
# publish
2016-09-28 05:38:46 +00:00
git push eleme master
2016-11-18 01:21:52 +00:00
git push eleme refs/tags/v$VERSION
2016-11-18 11:14:56 +00:00
git checkout dev
2016-11-18 11:55:29 +00:00
git rebase master
2016-11-18 11:14:56 +00:00
git push eleme dev
2016-11-18 01:21:52 +00:00
npm publish
fi