1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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>