Bitbucket: Format regex like other strategies
This commit is contained in:
parent
21b1888388
commit
466e55c6ab
@ -30,10 +30,10 @@ module Homebrew
|
|||||||
class Bitbucket
|
class Bitbucket
|
||||||
# The `Regexp` used to determine if the strategy applies to the URL.
|
# The `Regexp` used to determine if the strategy applies to the URL.
|
||||||
URL_MATCH_REGEX = %r{
|
URL_MATCH_REGEX = %r{
|
||||||
^https?://bitbucket\.org/
|
^https?://bitbucket\.org
|
||||||
(?<path>.+?)/ # The path leading up to the get or downloads part
|
/(?<path>.+?) # The path leading up to the get or downloads part
|
||||||
(?<dl_type>get|downloads)/ # An indicator of the file download type
|
/(?<dl_type>get|downloads) # An indicator of the file download type
|
||||||
(?<prefix>(?:[^/]+?[_-])?) # Filename text before the version
|
/(?<prefix>(?:[^/]+?[_-])?) # Filename text before the version
|
||||||
v?\d+(?:\.\d+)+ # The numeric version
|
v?\d+(?:\.\d+)+ # The numeric version
|
||||||
(?<suffix>[^/]+) # Filename text after the version
|
(?<suffix>[^/]+) # Filename text after the version
|
||||||
}ix.freeze
|
}ix.freeze
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user