move before GitHub tarballs

This commit is contained in:
Reto Kromer 2017-05-01 22:42:57 +02:00 committed by GitHub
parent b8e17502a3
commit cb5316fc17

View File

@ -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?