diff options
| author | Takashi Kokubun <takashikkbn@gmail.com> | 2025-12-11 16:59:26 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-11 16:59:26 -0800 |
| commit | 1f0ca55750413603057fabef39550feb9e7fc3c8 (patch) | |
| tree | 32bf24a5510efdc28cf7e663248df018a55e4b05 /tool | |
| parent | 06a6ad44f6faf35542e0bd1e15658340d449c2cf (diff) | |
make-snapshot: Update the tag format for Ruby 4.0+ (#15514)
Diffstat (limited to 'tool')
| -rwxr-xr-x | tool/make-snapshot | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tool/make-snapshot b/tool/make-snapshot index 041b1a0f2a..4af6a855eb 100755 --- a/tool/make-snapshot +++ b/tool/make-snapshot @@ -272,10 +272,18 @@ def package(vcs, rev, destdir, tmp = nil) when /\A(\d+)\.(\d+)\.(\d+)-(preview|rc)(\d+)/ prerelease = true tag = "#{$4}#{$5}" - url = vcs.tag("v#{$1}_#{$2}_#{$3}_#{$4}#{$5}") + if Integer($1) >= 4 + url = vcs.tag("v#{rev}") + else + url = vcs.tag("v#{$1}_#{$2}_#{$3}_#{$4}#{$5}") + end when /\A(\d+)\.(\d+)\.(\d+)\z/ tag = "" - url = vcs.tag("v#{$1}_#{$2}_#{$3}") + if Integer($1) >= 4 + url = vcs.tag("v#{rev}") + else + url = vcs.tag("v#{$1}_#{$2}_#{$3}") + end when /\A(\d+)\.(\d+)\z/ url = vcs.branch("ruby_#{rev.tr('.', '_')}") else |
