On Tuesday 10 August 2010, Parker Selbert wrote:
> Michael Schuerig wrote:
> > I'd like to be able to see from generated pages which version of
> > the app has generated it. As we're using git and always deploy a
> > specific tag, having that tag in the HTML head as a meta tag would
> > be suitable.
> > 
> > My current idea goes like this. The layout includes a partial that
> > looks like this
> > 
> >   <meta name="version"
> >   
> >    content="<%= `git describe --tags --always --dirty`.chomp %>">
> > 
> > When deployed, this file is overwritten with a static one referring
> > to the deployed git tag
> > 
> >   <meta name="version" content="v1.1.42">
> >
[capistrano recipe for writing the version snipped]


> I don't see where security would be an issue here, but reusability
> may be. A more generic "VERSION" file that can be loaded and read
> from would be available anywhere in your application, and could be
> simpler to maintain. You could do it as a plaintext file that just
> reads '1.1.42', or namespace it as MyApp::VERSION etc.

I didn't explain why I want this version number to begin with. I don't 
need the version anywhere in the app. The whole point is to identify the 
version of the app that has generated a page. So, if I get a bug report 
from a tester or user, I can tell them to attach the offending page to 
the bug report and from that I can find out what version they were 
using.

Michael

-- 
Michael Schuerig
mailto:[email protected]
http://www.schuerig.de/michael/

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to