Skip to content

Commit

Permalink
Improve name
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Nov 28, 2024
1 parent 156cfac commit cdcd521
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions dev/release/post-12-bump-versions-test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def bump_type
(data || {})[:bump_type]
end

def current_version
def released_version
return @release_version if bump_type.nil?

previous_version_components = @previous_version.split(".")
Expand All @@ -55,8 +55,8 @@ def current_version
previous_version_components.join(".")
end

def current_compatible_version
compute_compatible_version(current_version)
def released_compatible_version
compute_compatible_version(released_version)
end

def bump_versions(*targets)
Expand All @@ -74,12 +74,12 @@ def bump_versions(*targets)
when :minor, :patch
sh(env,
"dev/release/post-12-bump-versions.sh",
current_version,
released_version,
@release_version)
else
sh(env,
"dev/release/post-12-bump-versions.sh",
current_version,
released_version,
@next_version)
end
end
Expand All @@ -99,7 +99,7 @@ def test_version_post_tag
path: "ci/scripts/PKGBUILD",
hunks: [
["-pkgver=#{@previous_version}.9000",
"+pkgver=#{current_version}.9000"],
"+pkgver=#{released_version}.9000"],
],
},
]
Expand All @@ -126,16 +126,16 @@ def test_version_post_tag
path: "r/DESCRIPTION",
hunks: [
["-Version: #{@previous_version}.9000",
"+Version: #{current_version}.9000"],
"+Version: #{released_version}.9000"],
],
},
{
path: "r/NEWS.md",
hunks: [
["-# arrow #{@previous_version}.9000",
"+# arrow #{current_version}.9000",
"+# arrow #{released_version}.9000",
"+",
"+# arrow #{current_version}",],
"+# arrow #{released_version}",],
],
},
{
Expand All @@ -144,8 +144,8 @@ def test_version_post_tag
[
"-<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/\">#{current_version}.9000 (dev)</a></p>",
"+<p><a href=\"../r/\">#{current_version} (release)</a></p>",
"+<body><p><a href=\"../dev/r/\">#{released_version}.9000 (dev)</a></p>",
"+<p><a href=\"../r/\">#{released_version} (release)</a></p>",
],
],
},
Expand All @@ -154,9 +154,9 @@ def test_version_post_tag
hunks: [
[
"- \"name\": \"#{@previous_version}.9000 (dev)\",",
"+ \"name\": \"#{current_version}.9000 (dev)\",",
"+ \"name\": \"#{released_version}.9000 (dev)\",",
"- \"name\": \"#{@previous_r_version} (release)\",",
"+ \"name\": \"#{current_version} (release)\",",
"+ \"name\": \"#{released_version} (release)\",",
],
],
},
Expand Down

0 comments on commit cdcd521

Please sign in to comment.