Allow underscore in github version numbers.
This commit is contained in:
parent
7d44a389f7
commit
f0b6870de7
@ -108,15 +108,20 @@ class Pathname
|
|||||||
stem=self.stem
|
stem=self.stem
|
||||||
end
|
end
|
||||||
|
|
||||||
# github tarballs are special
|
# github tarballs, like v1.2.3
|
||||||
# we only support numbered tagged downloads
|
|
||||||
%r[github.com/.*/tarball/v?((\d\.)+\d+)$].match to_s
|
%r[github.com/.*/tarball/v?((\d\.)+\d+)$].match to_s
|
||||||
return $1 if $1
|
return $1 if $1
|
||||||
|
|
||||||
|
# dashed version
|
||||||
# eg. github.com/isaacs/npm/tarball/v0.2.5-1
|
# eg. github.com/isaacs/npm/tarball/v0.2.5-1
|
||||||
%r[github.com/.*/tarball/v?((\d\.)+\d+-(\d+))$].match to_s
|
%r[github.com/.*/tarball/v?((\d\.)+\d+-(\d+))$].match to_s
|
||||||
return $1 if $1
|
return $1 if $1
|
||||||
|
|
||||||
|
# underscore version
|
||||||
|
# eg. github.com/petdance/ack/tarball/1.93_02
|
||||||
|
%r[github.com/.*/tarball/v?((\d\.)+\d+_(\d+))$].match to_s
|
||||||
|
return $1 if $1
|
||||||
|
|
||||||
# eg. boost_1_39_0
|
# eg. boost_1_39_0
|
||||||
/((\d+_)+\d+)$/.match stem
|
/((\d+_)+\d+)$/.match stem
|
||||||
return $1.gsub('_', '.') if $1
|
return $1.gsub('_', '.') if $1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user