release.sh 807 B

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