Skip to content

Commit

Permalink
GH-44570: [Release][R][Docs] Update r/pkgdown/assets/versions.html
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Oct 30, 2024
1 parent 2df7b23 commit 999c1a1
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 3 deletions.
23 changes: 23 additions & 0 deletions dev/release/01-prepare-test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,18 @@ def test_version_pre_tag
]
if next_release_type == :major
expected_changes += [
{
path: "r/pkgdown/assets/versions.html",
hunks: [
[
"-<body><p><a href=\"../dev/r/\">#{@previous_version}.9000 (dev)</a></p>",
"-<p><a href=\"../r/\">#{@previous_r_version} (release)</a></p>",
"+<body><p><a href=\"../dev/r/\">#{@release_version}.9000 (dev)</a></p>",
"+<p><a href=\"../r/\">#{@release_version} (release)</a></p>",
"+<p><a href=\"../#{@previous_compatible_version}/r/\">#{@previous_r_version}</a></p>",
]
],
},
{
path: "r/pkgdown/assets/versions.json",
hunks: [
Expand All @@ -281,6 +293,17 @@ def test_version_pre_tag
]
else
expected_changes += [
{
path: "r/pkgdown/assets/versions.html",
hunks: [
[
"-<body><p><a href=\"../dev/r/\">#{@previous_version}.9000 (dev)</a></p>",
"-<p><a href=\"../r/\">#{@previous_r_version} (release)</a></p>",
"+<body><p><a href=\"../dev/r/\">#{@release_version}.9000 (dev)</a></p>",
"+<p><a href=\"../r/\">#{@release_version} (release)</a></p>",
]
],
},
{
path: "r/pkgdown/assets/versions.json",
hunks: [
Expand Down
23 changes: 23 additions & 0 deletions dev/release/post-12-bump-versions-test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,18 @@ def test_version_post_tag
["+ (#{@next_major_version}, 0),"],
],
},
{
path: "r/pkgdown/assets/versions.html",
hunks: [
[
"-<body><p><a href=\"../dev/r/\">#{@previous_version}.9000 (dev)</a></p>",
"-<p><a href=\"../r/\">#{@previous_r_version} (release)</a></p>",
"+<body><p><a href=\"../dev/r/\">#{@release_version}.9000 (dev)</a></p>",
"+<p><a href=\"../r/\">#{@release_version} (release)</a></p>",
"+<p><a href=\"../#{@previous_compatible_version}/r/\">#{@previous_r_version}</a></p>",
],
],
},
{
path: "r/pkgdown/assets/versions.json",
hunks: [
Expand All @@ -228,6 +240,17 @@ def test_version_post_tag
]
else
expected_changes += [
{
path: "r/pkgdown/assets/versions.html",
hunks: [
[
"-<body><p><a href=\"../dev/r/\">#{@previous_version}.9000 (dev)</a></p>",
"-<p><a href=\"../r/\">#{@previous_r_version} (release)</a></p>",
"+<body><p><a href=\"../dev/r/\">#{@release_version}.9000 (dev)</a></p>",
"+<p><a href=\"../r/\">#{@release_version} (release)</a></p>",
],
],
},
{
path: "r/pkgdown/assets/versions.json",
hunks: [
Expand Down
1 change: 1 addition & 0 deletions dev/release/utils-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ update_versions() {
"${base_version}" \
"${next_version}"
git add docs/source/_static/versions.json
git add r/pkgdown/assets/versions.html
git add r/pkgdown/assets/versions.json
popd
}
Expand Down
12 changes: 9 additions & 3 deletions r/pkgdown/assets/versions.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
<!DOCTYPE html>
<html>
<body><p><a href="../dev/r/">13.0.0.9000 (dev)</a></p>
<p><a href="../r/">13.0.0.1 (release)</a></p>
<body><p><a href="../dev/r/">18.0.0.9000 (dev)</a></p>
<p><a href="../r/">18.0.0 (release)</a></p>
<p><a href="../17.0/r/">17.0.0</a></p>
<p><a href="../16.1/r/">16.1.0</a></p>
<p><a href="../15.0/r/">15.0.2</a></p>
<p><a href="../14.0/r/">14.0.2</a></p>
<p><a href="../13.0/r/">13.0.0.1</a></p>
<p><a href="../12.0/r/">12.0.1.1</a></p>
<p><a href="../11.0/r/">11.0.0.3</a></p>
<p><a href="../12.0/r/">12.0.0</a></p>
<p><a href="../11.0/r/">11.0.0</a></p>
<p><a href="../10.0/r/">10.0.1</a></p>
<p><a href="../9.0/r/">9.0.0</a></p>
<p><a href="../8.0/r/">8.0.0</a></p>
Expand Down

0 comments on commit 999c1a1

Please sign in to comment.