Skip to content
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

bump-revision: fix for new license syntax #8708

Merged
merged 2 commits into from Sep 14, 2020

Conversation

Rylan12
Copy link
Member

@Rylan12 Rylan12 commented Sep 12, 2020

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Fix bump-revision to work with the new license syntax

bump-revision can now handle license strings and license hashes (I didn't add support for arrays because they are deprecated as of 2.5.0)

I've tested with the following licenses:

license "MIT"

license :public_domain

license "MIT" => { with: "LLVM-exception" }

license any_of: ["MIT", "0BSD"]

license all_of: ["MIT", "0BSD"]

license any_of: ["MIT", all_of: ["0BSD", "Zlib"]]

license any_of: ["GPL-2.0-or-later", "MIT" => { with: "LLVM-exception" }, any_of: ["MIT", "0BSD"]]

@Rylan12 Rylan12 mentioned this pull request Sep 12, 2020
6 tasks
@scpeters
Copy link
Member

thanks for the quick fix!

have you tested with a symbol like the following:

license :public_domain

@Rylan12
Copy link
Member Author

Rylan12 commented Sep 12, 2020

Nope! Good catch. Just pushed a new commit to account for it.

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The else case seems a bit hacky/error-prone but doesn't seem any worse than what was there before. Thanks!

@MikeMcQuaid MikeMcQuaid merged commit c7e4a3d into Homebrew:master Sep 14, 2020
@Rylan12 Rylan12 deleted the bump-revision-fix-license branch September 14, 2020 12:20
@Rylan12
Copy link
Member Author

Rylan12 commented Sep 14, 2020

Agree. I'm open to suggestions on other ways to do it if desired.

@MikeMcQuaid
Copy link
Member

Think this is going to be another "use the parser gem" situation.

@scpeters
Copy link
Member

thanks again @Rylan12!

@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Dec 11, 2020
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Dec 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants