release.sh 671 B

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