Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added tag function.

	modified:   gen.sh
  • Loading branch information...
commit cacf33c6e12e0cb4d80b854004fb18d4ad73becb 1 parent e98d142
@pfarmer authored
Showing with 12 additions and 3 deletions.
  1. +12 −3 gen.sh
View
15 gen.sh
@@ -1,13 +1,22 @@
#!/bin/bash
case $1 in
- prepare)
- echo -e "/*\n * jquery-countdown plugin - `git describe --abbrev=4`" > js/jquery.countdown.js.new
+ tag)
+ if [ -z "$2" ]; then
+ echo "TAG?"
+ exit
+ fi
+ echo -e "/*\n * jquery-countdown plugin - v$2" > js/jquery.countdown.js.new
sed -e 's| console.log| // console.log|' js/jquery.countdown.js -e '1,2d' >> js/jquery.countdown.js.new
mv js/jquery.countdown.js.new js/jquery.countdown.js
- echo "/* jquery-countdown - `git describe --abbrev=4` - See un-minified version for license etc */" > js/jquery.countdown.min.js
+ echo "/* jquery-countdown - v$2 - See un-minified version for license etc */" > js/jquery.countdown.min.js
yuicompressor js/jquery.countdown.js >> js/jquery.countdown.min.js
+
+ git commit -a -m "Release v$2"
+ git tag -a v$2 -m "Release v$2"
+
+ echo "Don't forget to \"git push ; git push --tags\""
;;
debug)
sed -e 's| // console.log| console.log|' js/jquery.countdown.js > js/jquery.countdown.js.new
Please sign in to comment.
Something went wrong with that request. Please try again.