Skip to content

Commit 6601640

Browse files
committed
make-snapshot: Branch if it's X.Y.Z or X.Y using when
It just seems like a completely different input, so it makes more sense to me to have it as a separate case. Also, we don't need to support Ruby 2.0 or older.
1 parent 0ecf689 commit 6601640

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

tool/make-snapshot

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -274,14 +274,12 @@ def package(vcs, rev, destdir, tmp = nil)
274274
prerelease = true
275275
tag = "#{$4}#{$5}"
276276
url = vcs.tag("v#{$1}_#{$2}_#{$3}_#{$4}#{$5}")
277-
when /\A(\d+)\.(\d+)(?:\.(\d+))?\z/
278-
if $3 && ($1 > "2" || $1 == "2" && $2 >= "1")
279-
patchlevel = true
280-
tag = ""
281-
url = vcs.tag("v#{$1}_#{$2}_#{$3}")
282-
else
283-
url = vcs.branch("ruby_#{rev.tr('.', '_')}")
284-
end
277+
when /\A(\d+)\.(\d+)\.(\d+)\z/
278+
patchlevel = true
279+
tag = ""
280+
url = vcs.tag("v#{$1}_#{$2}_#{$3}")
281+
when /\A(\d+)\.(\d+)\z/
282+
url = vcs.branch("ruby_#{rev.tr('.', '_')}")
285283
else
286284
warn "#{$0}: unknown version - #{rev}"
287285
return

0 commit comments

Comments
 (0)