1
0

release.sh 1009 B

123456789101112131415161718192021222324252627282930
  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. cli/support/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. git commit -a -m "Release version $VER"
  14. git tag -a "$VER"
  15. # echo bower upload
  16. # bower does not publish explicitly but implictly via semver tag
  17. echo Please check if everything is ok, then publish the new release with 'npm publish'
  18. fi
  19. echo -n "Which version are you going to work on? "
  20. VERF=`head -n 1`
  21. VER="${VERF}-pre"
  22. echo "Setting version $VER"
  23. cli/support/setversion.sh "$VER"
  24. cp package.json package.json.bak
  25. sed -e 's@/amber.git.*"@/amber.git"@' package.json.bak >package.json
  26. rm package.json.bak
  27. git commit -a -m "Working on $VERF"
  28. echo Please check if everything is ok, then push changes with 'git push --tags'