let @version be always externally set in guides generation [fixes #8221]

Shelling out was there for authors convenience, but we are
rather going to have the tag or SHA1 always in RAILS_VERSION
and if the environment variable is blank, then just use
"local" as a reminder that you are just working locally.

The docs server has been updated to set the long SHA1 in
RAILS_VERSION when generating edge guides.
This commit is contained in:
Xavier Noria 2012-12-07 15:20:02 +01:00
parent 89ab303d8b
commit 0adcf6d90e
2 changed files with 2 additions and 2 deletions

View File

@ -84,7 +84,7 @@ module RailsGuides
@warnings = ENV['WARNINGS'] == '1'
@all = ENV['ALL'] == '1'
@kindle = ENV['KINDLE'] == '1'
@version = ENV['RAILS_VERSION'] || `git rev-parse --short HEAD`.chomp
@version = ENV['RAILS_VERSION'] || 'local'
@lang = ENV['GUIDES_LANGUAGE']
end

View File

@ -1,4 +1,4 @@
<h2>Ruby on Rails Guides (<%= @version %>)</h2>
<h2>Ruby on Rails Guides (<%= @edge ? @version[0, 7] : @version %>)</h2>
<% if @edge %>
<p>