File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -83,16 +83,19 @@ def generate_src(target_version:)
8383 cp_r copy_sources , target_dir
8484
8585 cd target_dir do
86+ # Generate index.html
8687 if Gem ::Version . new ( target_version ) >= Gem ::Version . new ( '7.1' )
8788 cp NEW_INDEX_HTML , 'index.html'
88- return
89+ else
90+ cp INDEX_HTML , 'index.html'
8991 end
9092
91- cp INDEX_HTML , 'index.html'
9293 # Prepend version number to the absolute path in navigation.html
93- content = File . read ( 'navigation.html' )
94- content . gsub! ( '<a href="/' , "<a href=\" /#{ target_version } /" )
95- File . write ( 'navigation.html' , content )
94+ unless target_version == default_rails_version
95+ content = File . read ( 'navigation.html' )
96+ content . gsub! ( '<a href="/' , "<a href=\" /#{ target_version } /" )
97+ File . write ( 'navigation.html' , content )
98+ end
9699 end
97100end
98101
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments