-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
publii: update livecheck #203720
publii: update livecheck #203720
Conversation
bd6b505
to
07db8cc
Compare
Based on a conversation I had with upstream (GetPublii/Publii#2075), I was exploring a different approach using Here’s what I had in mind: @@ -11,8 +11,12 @@ cask "publii" do
homepage "https://getpublii.com/"
livecheck do
- url "https://getpublii.com/download/"
- regex(/href=.*?Publii[._-]v?(\d+(?:\.\d+)+)(?:[._-]#{arch})?\.dmg/i)
+ url "https://raw.githubusercontent.com/GetPublii/Publii/refs/heads/master/app/back-end/builddata.json"
+ strategy :json do |json|
+ version = json["version"]
+ build = json["build"]
+ "#{version}+#{build}"
+ end
end
app "Publii.app" Would something like this be worth considering as an alternative? |
Thanks, that’s worth a consideration. We should wait for the maintainer’s response, though. Ideally, upstream would consider your suggestion to include the build number in the filename so that we could use checksums again. |
Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com>
I looked a bit deeper into Publii's update mechanism and found that it uses the https://getpublii.com/notifications.json endpoint. This currently provides the latest version, build, and an update message: [
{
"text": "A new build of Publii 0.46.4 is available! (Build 17047) <a href='https://getpublii.com/blog/release-046-4.html' target='_blank'>Check it out</a>",
"timestamp": 1740833101000,
"publiiMaxVersion": "0.46.3"
}
] The current PR works well with the download page, so I don’t want to hold it up. That said, using this endpoint for I don't know how the endpoint is generated. If there’s any doubt about the build always being included, then relying on the Just wanted to share this as an idea to explore, especially if waiting on upstream feedback doesn’t provide further clarity. |
Thank you! Let's merge this for now, and we can explore the other option once upstream provides more information. |
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:
brew audit --cask --online <cask>
is error-free.brew style --fix <cask>
reports no offenses.Additionally, if adding a new cask:
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.This PR removes the cask's checksum and captures the build number in the
livecheck
block, as upstream regularly releases new builds under the same version number: