2
0

release-worker.sh 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/sh
  2. # ATTENTION: Be logged into npm before running this script,
  3. # as a user with write access to amber npm package.
  4. git reset --hard
  5. git checkout master
  6. git clean -d -x -f
  7. npm install
  8. echo -n "Which version are you going to publish [0 to skip]? "
  9. VER=`head -n 1`
  10. if [ "$VER" = "0" ]; then :; else
  11. echo "Publishing version $VER"
  12. cli/support/setversion.sh "$VER"
  13. cp package.json package.json.bak
  14. sed -e 's@/amber.git.*"@/amber.git#'"$VER"'"@' package.json.bak >package.json
  15. rm package.json.bak
  16. git add package.json
  17. bin/amberc -m AmberCli -n amber_cli -l Compiler-Exceptions,Compiler-Core,Compiler-AST,Compiler-IR,Compiler-Inlining,Compiler-Semantic,Compiler-Interpreter,parser cli/src/AmberCli.st cli/support/amber-cli
  18. git add cli/support/amber-cli.js
  19. git commit -a -m "Release version $VER"
  20. git tag -a "$VER" -m "Release version $VER"
  21. # bower does not publish explicitly but implictly via semver tag
  22. echo npm publish
  23. fi
  24. echo -n "Which version are you going to work on? "
  25. VERF=`head -n 1`
  26. VER="${VERF}-pre"
  27. echo "Setting version $VER"
  28. cli/support/setversion.sh "$VER"
  29. cp package.json package.json.bak
  30. sed -e 's@/amber.git.*"@/amber.git"@' package.json.bak >package.json
  31. rm package.json.bak
  32. git add package.json
  33. bin/amberc -m AmberCli -n amber_cli -l Compiler-Exceptions,Compiler-Core,Compiler-AST,Compiler-IR,Compiler-Inlining,Compiler-Semantic,Compiler-Interpreter,parser cli/src/AmberCli.st cli/support/amber-cli
  34. git add cli/support/amber-cli.js
  35. git commit -a -m "Working on $VERF"
  36. git push --tags