Skip to content

Instantly share code, notes, and snippets.

@jeresig
Created January 24, 2011 22:09
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeresig/794070 to your computer and use it in GitHub Desktop.
Save jeresig/794070 to your computer and use it in GitHub Desktop.
Push a new jQuery release up to the CDN.
#!/bin/tcsh
# Create a new jQuery Relase
# Run like so:
# ./release.sh VERSION
# By John Resig
git pull
echo -n $1 > version.txt
git add version.txt
git commit -m "Tagging the $1 release."
git push
git tag $1
git push origin $1
# Optional zip file
# rm -f *.zip
make clean
make init
make jquery
make min
echo -n $2 > version.txt
git add version.txt
git commit -m "Updating the source version to $2."
git push
# Optional zip file
#zip -r jquery-$1-build.zip GPL-LICENSE.txt MIT-LICENSE.txt Makefile README build build.xml src test version.txt
#zip -r jquery-$1-release.zip dist src test
cp -f dist/jquery.min.js jquery-$1.min.js
cp -f dist/jquery.js jquery-$1.js
scp jquery-$1* jqadmin@code.origin.jquery.com:/var/www/html/code.jquery.com/
# Optional zip file
#cp -f jquery-$1-build.zip jquery-latest-build.zip
#cp -f jquery-$1-release.zip jquery-latest-release.zip
#cp -f jquery-$1.pack.js jquery-latest.pack.js
# Uncomment in order to push a final release
#cp -f jquery-$1.min.js jquery-latest.min.js
#cp -f jquery-$1.min.js jquery.min.js#cp -f jquery-$1.js jquery-latest.js
#cp -f jquery-$1.js jquery.js
#scp jquery.min.js jquery-latest.* jquery.js jqadmin@code.origin.jquery.com:/var/www/html/code.jquery.com/
#curl http://code.origin.jquery.com/jquery-latest.js?reload
#curl http://code.origin.jquery.com/jquery-latest.min.js?reload
#curl http://code.origin.jquery.com/jquery.js?reload
#curl http://code.origin.jquery.com/jquery.min.js?reload
@mathiasbynens
Copy link

(Minor, whiny suggestion.)

How about s/tagging/tag/ in the commit message?

git commit -m "Tag the $1 release."

This way it’s more in line with other commit messages, like “Remove x”, “Merge y”, “Update z”, “Land foo”.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment