I am deploying my rails 3 app using capistrano, and I want to get the git version (and date information) and update my website\'s footer with this.
How can I do this? >
Long time ago I did this for subversion:
in an initializer I put a global
SVN_REVISION = `svn info | ruby -ne 'puts $1 if $_ =~ /^Revision: ([0-9]*)/'`
and in the application layout:
with git you could change the global to something like:
git log -1 | ruby -ne 'puts $1 if $_ =~ %r{^Date: (.+) \+\d+$}'
Now thinking about it, it may be better to:
I'm not sure, it's just an idea.