New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install all licenses #8256
Install all licenses #8256
Conversation
Handle cases of dual licensing where license filenames start with "LICENSE-" or "LICENCE-" prefix.
def list?(file) | ||
return false if %w[.DS_Store INSTALL_RECEIPT.json].include?(file) | ||
|
||
!copy?(file) | ||
end | ||
|
||
def copy?(file) | ||
return true if license?(file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now the two entries in BASENAMES
are not used anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True that, do we want to get rid of them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either that, or move them to something like BASENAME_REGEXES
:
BASENAME_REGEXES = [/^licen(c|s)e(\-|$)/].freeze
and change the check to
BASENAMES.include?(file) || BASENAME_REGEXES.any? { |r| r.match?(file) }
so we don't even need the license?
helper function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't even need to be an array of regexes.
@vladimyr Did you get my email on 26th June? If not: let me know and I'll resend. Thanks! |
@vladimyr any progress on this? I've found another similar instance that should probably be added to this PR. In Homebrew/homebrew-core#60066 I realized that the |
brew style
with your changes locally?brew tests
with your changes locally?Handle cases of dual licensing where license filenames start with
"LICENSE-"
or"LICENCE-"
prefix.Continuation of #7953