release.sh 733 B

123456789101112131415161718192021222324252627282930313233
  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. git checkout master
  15. npm version $VERSION --message "[release] $VERSION"
  16. git push origin master --tags
  17. npm publish --tag next
  18. cd ../..
  19. # commit
  20. git submodule update
  21. git add -A
  22. git commit -m "[build] $VERSION"
  23. npm version $VERSION --message "[release] $VERSION"
  24. # publish
  25. git push eleme refs/tags/v$VERSION
  26. git push eleme master
  27. npm publish --tag next
  28. fi