mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00

Follow-up from #812 to fix handling fully-qualified versioned formulae names. Allows pulling https://github.com/Homebrew/homebrew-core/pull/971.
9 lines
634 B
Ruby
9 lines
634 B
Ruby
# match taps' formulae, e.g. someuser/sometap/someformula
|
|
HOMEBREW_TAP_FORMULA_REGEX = %r{^([\w-]+)/([\w-]+)/([\w+-.@]+)$}
|
|
# match taps' directory paths, e.g. HOMEBREW_LIBRARY/Taps/someuser/sometap
|
|
HOMEBREW_TAP_DIR_REGEX = %r{#{Regexp.escape(HOMEBREW_LIBRARY.to_s)}/Taps/([\w-]+)/([\w-]+)}
|
|
# match taps' formula paths, e.g. HOMEBREW_LIBRARY/Taps/someuser/sometap/someformula
|
|
HOMEBREW_TAP_PATH_REGEX = Regexp.new(HOMEBREW_TAP_DIR_REGEX.source + %r{/(.*)}.source)
|
|
# match the default and the versions brew-cask tap e.g. Caskroom/cask or Caskroom/versions
|
|
HOMEBREW_CASK_TAP_FORMULA_REGEX = %r{^([Cc]askroom)/(cask|versions)/([\w+-.]+)$}
|