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

openchrom 1.5.0 (new cask) #193076

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Mailaender
Copy link

Important: Do not tick a checkbox if you haven’t performed its action. Honesty is indispensable for a smooth review process.

In the following questions <cask> is the token of the cask you're submitting.

After making any changes to a cask, existing or new, verify:

Additionally, if adding a new cask:

  • Named the cask according to the token reference.
  • Checked the cask was not already refused (add your cask's name to the end of the search field).
  • brew audit --cask --new <cask> worked successfully.
  • HOMEBREW_NO_INSTALL_FROM_API=1 brew install --cask <cask> worked successfully.
  • brew uninstall --cask <cask> worked successfully.

Comment on lines +14 to +22
livecheck do
url "https://marketplace.lablicate.com/api/downloads/hash-size"
strategy :json do |json|
json["data"]["items"]
.select { |item| item["name"].include?("openchrom-lablicate_macosx") }
.map { |item| item["name"][/(\d+(?:\.\d+)+)/, 1] }
.max_by { |version| Gem::Version.new(version) }
end
end
Copy link
Member

@krehel krehel Nov 23, 2024

Choose a reason for hiding this comment

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

I think the livecheck can be simplified down to this, would love @samford's input here!

Suggested change
livecheck do
url "https://marketplace.lablicate.com/api/downloads/hash-size"
strategy :json do |json|
json["data"]["items"]
.select { |item| item["name"].include?("openchrom-lablicate_macosx") }
.map { |item| item["name"][/(\d+(?:\.\d+)+)/, 1] }
.max_by { |version| Gem::Version.new(version) }
end
end
livecheck do
url "https://marketplace.lablicate.com/api/downloads/hash-size"
regex(/OpenChrom[._-]?v?(\d+(?:\.\d+)+)[._-]#{arch}\.dmg/i)
strategy :json do |json|
json.dig("data", "items")&.filter_map do |item|
item["name"]&.[](regex, 1)
end
end
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants