release.sh 679 B

12345678910111213141516171819202122232425262728293031
  1. set -e
  2. echo "Enter release version: "
  3. read VERSION
  4. read -p "Releasing $VERSION - are you sure? (y/n)" -n 1 -r
  5. echo # (optional) move to a new line
  6. if [[ $REPLY =~ ^[Yy]$ ]]
  7. then
  8. echo "Releasing $VERSION ..."
  9. # build
  10. VERSION=$VERSION npm run dist
  11. # publish theme
  12. echo "Releasing theme-default $VERSION ..."
  13. cd packages/theme-default
  14. npm version $VERSION --message "[release] $VERSION"
  15. npm publish --tag next
  16. cd ../..
  17. # commit
  18. git submodule update
  19. git add -A
  20. git commit -m "[build] $VERSION"
  21. npm version $VERSION --message "[release] $VERSION"
  22. # publish
  23. git push eleme refs/tags/v$VERSION
  24. git push eleme master
  25. npm publish --tag next
  26. fi