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

circuitjs1: update livecheck #172055

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Casks/c/circuitjs1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
homepage "https://www.falstad.com/circuit/"

livecheck do
url :url
strategy :extract_plist
url "https://github.com/pfalstad/circuitjs1/blob/master/src/com/lushprojects/circuitjs1/client/circuitjs1.java"
Copy link
Member

@samford samford Apr 24, 2024

Choose a reason for hiding this comment

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

Looking at the GitHub repository, the commit to update circuitjs1.java to 2.9.0js was on 2024-02-24 but the dmg was last modified on 2024-02-26. If we check the circuitjs1.java file, livecheck will surface a new version before the dmg file is updated (this is why we try to align the check with the same source as the cask url).

If we bump the version before the falstad.com dmg is updated, then users would seemingly update to a new version but would still be downloading an older version (i.e., they would be stuck on the older version unless they run brew reinstall circuitjs1 after the dmg is updated). I'm not sure that we have an audit that would catch the mismatch between the cask version and plist version (or if it's even possible, since we have some multipart (CSV) cask versions), so this could be an issue. Thoughts on this situation, @homebrew/cask?

[If checking circuitjs1.java ends up being feasible, I'll add some suggestions to bring the livecheck block in line.]

Copy link
Member

Choose a reason for hiding this comment

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

I defer to you on this one @samford.

Copy link
Member

Choose a reason for hiding this comment

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

@p-linnane With the above in mind, checking circuitjs1.java doesn't seem like an adequate alternative to ExtractPlist here, unfortunately. Without an audit to catch a version mismatch and prevent a version bump PR from being merged until the unversioned falstad.com dmg is updated, this setup would cause problems in ways that wouldn't be apparent on CI.

Copy link
Member

Choose a reason for hiding this comment

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

Thank you @samford. Closing per the above.

regex(/versionString = \\"([^\\]*)\\/i)
strategy :page_match
end

app "CircuitJS1.app"
Expand Down
Loading