2
0

release-weex.sh 814 B

123456789101112131415161718192021222324252627282930313233343536
  1. set -e
  2. CUR_VERSION=`node build/get-weex-version.js -c`
  3. NEXT_VERSION=`node build/get-weex-version.js`
  4. echo "Current: $CUR_VERSION"
  5. read -p "Enter new version ($NEXT_VERSION): " -n 1 -r
  6. if ! [[ -z $REPLY ]]; then
  7. NEXT_VERSION=$REPLY
  8. fi
  9. read -p "Releasing weex-vue-framework@$NEXT_VERSION - are you sure? (y/n) " -n 1 -r
  10. echo
  11. if [[ $REPLY =~ ^[Yy]$ ]]; then
  12. echo "Releasing weex-vue-framework@$NEXT_VERSION ..."
  13. npm run lint
  14. npm run flow
  15. npm run test:weex
  16. # build
  17. WEEX_VERSION=$NEXT_VERSION npm run build:weex
  18. # update package
  19. cd packages/weex-vue-framework
  20. npm version $NEXT_VERSION
  21. npm publish
  22. cd -
  23. cd packages/weex-template-compiler
  24. npm version $NEXT_VERSION
  25. npm publish
  26. cd -
  27. # commit
  28. git add packages/weex*
  29. git commit -m "[release] weex-vue-framework@$NEXT_VERSION"
  30. fi