Skip to content

Commit

Permalink
let @Version be always externally set in guides generation [fixes #8221]
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fxn committed Dec 7, 2012
1 parent 89ab303 commit 0adcf6d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion guides/rails_guides/generator.rb
Expand Up @@ -84,7 +84,7 @@ def set_flags_from_environment
@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

Expand Down
2 changes: 1 addition & 1 deletion guides/source/_welcome.html.erb
@@ -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>
Expand Down

0 comments on commit 0adcf6d

Please sign in to comment.