Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Managing releases on github

What's a good approach to handling software releases on github. My repo https://github.com/wheresrhys/jQuery-flickbook contains all the src and build files together with a built (minified) version of the javascript.

But I would also like it to, once I advance to the next version release, to include a e.g. jquery.flickbook-0.5.min.js file into a releases directory. To what degree can this be automated (using ant and git branches and tags), or is it something I will have to manually carry out?

like image 410
wheresrhys Avatar asked Jan 13 '12 12:01

wheresrhys


1 Answers

This is how I'd do it (note: this makes the assumption that master is your "reference" branch):

  • when you are ready to release a new version, create a branch x.y-release on master and check it out (git checkout -b x.y-release master);
  • add your minified version, commit;
  • create a tag x.y (git tag x.y -- you want to have a look at the manpage, you can create "tag objects" too);
  • push the tag (not the branch) (git push theremote --tags, or even git push theremote x.y);
  • when done, switch back to master (git checkout master);
  • get rid of the release branch locally (git branch -D x.y-release) if you want to.

This means the minified version never makes its way into master but does end up in the tag, which means everything is there, as a tag is a refspec just as any branch is.

like image 86
fge Avatar answered Oct 10 '22 15:10

fge