Merge pull request #2591 from retokromer/patch-1
fix date-based versioning
This commit is contained in:
commit
e4ecf6d6bc
@ -316,6 +316,11 @@ class Version
|
||||
spec.stem
|
||||
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
|
||||
# e.g. https://github.com/foo/bar/tarball/v1.2.3
|
||||
# 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)
|
||||
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
|
||||
m = /-((?:\d)+-\d+)/.match(stem)
|
||||
return m.captures.first unless m.nil?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user