diff options
| author | Adam Vandenberg | 2010-11-07 11:25:20 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2010-11-07 11:25:20 -0800 |
| commit | f0b6870de76a3cbb328c55de677a21c123f0b35a (patch) | |
| tree | b90cac0392720d1604e1a26e535b64366895e725 /Library | |
| parent | 7d44a389f70e1530bb6dbb35dbab6d58b7d48b36 (diff) | |
| download | brew-f0b6870de76a3cbb328c55de677a21c123f0b35a.tar.bz2 | |
Allow underscore in github version numbers.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/extend/pathname.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index f61a69e09..8b690a258 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -108,15 +108,20 @@ class Pathname stem=self.stem end - # github tarballs are special - # we only support numbered tagged downloads + # github tarballs, like v1.2.3 %r[github.com/.*/tarball/v?((\d\.)+\d+)$].match to_s return $1 if $1 + # dashed version # eg. github.com/isaacs/npm/tarball/v0.2.5-1 %r[github.com/.*/tarball/v?((\d\.)+\d+-(\d+))$].match to_s 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 /((\d+_)+\d+)$/.match stem return $1.gsub('_', '.') if $1 |
