mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
move before GitHub tarballs
This commit is contained in:
parent
b8e17502a3
commit
cb5316fc17
@ -316,6 +316,11 @@ class Version
|
|||||||
spec.stem
|
spec.stem
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# date-based versioning
|
||||||
|
# e.g. ltopers-v2017-04-14.tar.gz
|
||||||
|
m = /-v?(\d{4}-\d{2}-\d{2})/.match(stem)
|
||||||
|
return m.captures.first unless m.nil?
|
||||||
|
|
||||||
# GitHub tarballs
|
# GitHub tarballs
|
||||||
# e.g. https://github.com/foo/bar/tarball/v1.2.3
|
# e.g. https://github.com/foo/bar/tarball/v1.2.3
|
||||||
# e.g. https://github.com/sam-github/libnet/tarball/libnet-1.1.4
|
# e.g. https://github.com/sam-github/libnet/tarball/libnet-1.1.4
|
||||||
@ -344,11 +349,6 @@ class Version
|
|||||||
m = /[-v]((?:\d+\.)*\d+)$/.match(spec_s)
|
m = /[-v]((?:\d+\.)*\d+)$/.match(spec_s)
|
||||||
return m.captures.first unless m.nil?
|
return m.captures.first unless m.nil?
|
||||||
|
|
||||||
# date-based versioning
|
|
||||||
# e.g. ltopers-v2017-04-14.tar.gz
|
|
||||||
m = /-v?(\d{4}-\d{2}-\d{2})/.match(stem)
|
|
||||||
return m.captures.first unless m.nil?
|
|
||||||
|
|
||||||
# e.g. lame-398-1
|
# e.g. lame-398-1
|
||||||
m = /-((?:\d)+-\d+)/.match(stem)
|
m = /-((?:\d)+-\d+)/.match(stem)
|
||||||
return m.captures.first unless m.nil?
|
return m.captures.first unless m.nil?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user