-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #151 from oleg-nenashev/3.x-links
Deploy the 3.x links too, same as the main branch
- Loading branch information
Showing
4 changed files
with
30 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,27 @@ | ||
# Merges sitemaps, to be called from the root directory | ||
header, footer, content1, content2 = [] | ||
header, footer, content_main, content_2x, content_3x = [] | ||
|
||
File.open( "_site/sitemap.xml", 'r' ) do |f1| | ||
content1 = (IO.readlines f1) | ||
header = content1.slice!( 0..11 ) | ||
footer = [ content1.slice!( -1 ) ] | ||
content_main = (IO.readlines f1) | ||
header = content_main.slice!( 0..11 ) | ||
footer = [ content_main.slice!( -1 ) ] | ||
end | ||
|
||
File.open( ".submodules/wiremock.org-2.x/tmp/site_2x/sitemap.xml", 'r' ) do |f2| | ||
content2 = (IO.readlines f2) | ||
content2.slice!( 0..11 ) | ||
content2.slice!( -1 ) | ||
content_2x = (IO.readlines f2) | ||
content_2x.slice!( 0..11 ) | ||
content_2x.slice!( -1 ) | ||
end | ||
|
||
File.open( "_site/sitemap.xml", 'w' ) do |f3| | ||
f3.write ( header + content1 + content2 + footer ).join() | ||
File.open( "./tmp/site_3x/sitemap.xml", 'r' ) do |f3| | ||
content_3x = (IO.readlines f3) | ||
content_3x.slice!( 0..11 ) | ||
content_3x.slice!( -1 ) | ||
end | ||
|
||
File.open( "_site/sitemap.xml", 'w' ) do |f4| | ||
f4.write ( header + content_main + content_2x + content_3x + footer ).join() | ||
end | ||
|
||
|
||
puts "Merged main and 3.x sitemaps" | ||
puts "Merged main and version sitemaps" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
url: "https://wiremock.org/3.x" | ||
destination: "./tmp/site_3x" |