Warning: I'm not a git wizard, so I may not have the right terminology...
Before I push a release to github, I create a version file that reflects the current commit tag, sort of like this:
git commit -m <insert pithy comment here>
MAJOR=1
MINOR=2
BUILD=`git describe --all --tags`
echo VERSION = [${MAJOR}, ${MINOR}, #{BUILD}] > version.rb
git push origin master
This works, but for the obvious flaw that version.rb is modified after the commit has happened. I can add verion.rb to .gitignore, but is there a way to sneak verion.rb into the config after the commit without creating a new tag? Or is there another approach I'm not thinking of?