File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -83,16 +83,19 @@ def generate_src(target_version:)
83
83
cp_r copy_sources , target_dir
84
84
85
85
cd target_dir do
86
+ # Generate index.html
86
87
if Gem ::Version . new ( target_version ) >= Gem ::Version . new ( '7.1' )
87
88
cp NEW_INDEX_HTML , 'index.html'
88
- return
89
+ else
90
+ cp INDEX_HTML , 'index.html'
89
91
end
90
92
91
- cp INDEX_HTML , 'index.html'
92
93
# 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
96
99
end
97
100
end
98
101
You can’t perform that action at this time.
0 commit comments