WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@jasikpark
Copy link
Contributor

@jasikpark jasikpark commented Dec 4, 2025

This PR adds DNClient Desktop.app, from https://www.defined.net/downloads

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.

@jasikpark jasikpark changed the title Add dnclient-desktop.rb Add dnclient.rb Dec 4, 2025
This PR adds DNClient Desktop.app, from https://www.defined.net/downloads
@jasikpark jasikpark marked this pull request as ready for review December 4, 2025 22:39
@daeho-ro daeho-ro changed the title Add dnclient.rb dnclient 0.9.0 (new cask) Dec 5, 2025
Comment on lines 10 to 22
livecheck do
url "https://api.defined.net/v1/downloads"
regex(/^v?(\d+(?:\.\d+)+)$/i)
strategy :json do |json, regex|
json.dig("data", "dnclient")&.filter_map do |version, downloads|
next if version == "latest"
next unless downloads.key?("macos-universal-desktop")
next unless version.match?(regex)

version[regex, 1]
end
end
end
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
livecheck do
url "https://api.defined.net/v1/downloads"
regex(/^v?(\d+(?:\.\d+)+)$/i)
strategy :json do |json, regex|
json.dig("data", "dnclient")&.filter_map do |version, downloads|
next if version == "latest"
next unless downloads.key?("macos-universal-desktop")
next unless version.match?(regex)
version[regex, 1]
end
end
end
livecheck do
url "https://api.defined.net/v1/downloads"
strategy :json do |json|
json.dig("data", "versionInfo", "latest", "dnclient")
end
end

We might be able to simplify the livecheck by querying the versionInfo rather than the download URLs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The only issue is that the download url changes both due to the version change, and due to the git sha as a folder prefix

Copy link
Member

Choose a reason for hiding this comment

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

Thanks, I skipped over that part. We will have to capture the Git SHA as well since it changes with each version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I think I've got it.

@jasikpark jasikpark requested a review from khipp December 5, 2025 21:09
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