release.sh 656 B

123456789101112131415161718192021222324252627282930
  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 add -A
  19. git commit -m "[build] $VERSION"
  20. npm version $VERSION --message "[release] $VERSION"
  21. # publish
  22. git push eleme refs/tags/v$VERSION
  23. git push eleme master
  24. npm publish --tag next
  25. fi