| 1234567891011121314151617181920212223242526272829303132333435363738 | #!/bin/sh# ATTENTION: Be logged into npm before running this script,# as a user with write access to amber npm package.git reset --hardgit checkout mastergit clean -d -x -fnpm installecho -n "Which version are you going to publish [0 to skip]? "VER=`head -n 1`if [ "$VER" = "0" ]; then :; else	echo "Publishing version $VER"	cli/support/setversion.sh "$VER"	cp package.json package.json.bak	sed -e 's@/amber.git.*"@/amber.git#'"$VER"'"@' package.json.bak >package.json	rm package.json.bak	git add package.json	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	git add cli/support/amber-cli.js	git commit -a -m "Release version $VER"	git tag -a "$VER" -m "Release version $VER"# bower does not publish explicitly but implictly via semver tag	echo npm publishfiecho -n "Which version are you going to work on? "VERF=`head -n 1`VER="${VERF}-pre"echo "Setting version $VER"cli/support/setversion.sh "$VER"cp package.json package.json.baksed -e 's@/amber.git.*"@/amber.git"@' package.json.bak >package.jsonrm package.json.bakgit add package.jsonbin/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-cligit add cli/support/amber-cli.jsgit commit -a -m "Working on $VERF"git push --tags
 |