release.sh 771 B

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  2. cd `dirname "$0"`/..
  3. pwd
  4. echo -n "Which version are you going to publish [0 to skip]? "
  5. VER=`head -n 1`
  6. if [ "$VER" = "0" ]; then :; else
  7. echo "Publishing version $VER"
  8. bin/setversion.sh "$VER"
  9. cp package.json package.json.bak
  10. sed -e 's@/amber.git.*"@/amber.git#'"$VER"'"@' package.json.bak >package.json
  11. rm package.json.bak
  12. echo git commit -a -m "Release version $VER"
  13. echo git tag -a "$VER"
  14. echo bower upload
  15. echo npm upload
  16. fi
  17. echo -n "Which version are you going to work on? "
  18. VERF=`head -n 1`
  19. VER="${VER}-pre"
  20. echo "Setting version $VER"
  21. bin/setversion.sh "$VER"
  22. cp package.json package.json.bak
  23. sed -e 's@/amber.git.*"@/amber.git"@' package.json.bak >package.json
  24. rm package.json.bak
  25. echo git commit -a -m "Working on $VERF"
  26. echo git push --tags