-
-
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
Update eclecticlight casks livecheck and zap #172292
Conversation
Casks/d/dintch.rb
Outdated
url :homepage | ||
regex(%r{href=.*?/(\d+)/(\d+)/dintch(\d+)\.zip}i) | ||
strategy :page_match do |page, regex| | ||
page.scan(regex).map do |match| | ||
"#{match[2].split("", 2).join(".")},#{match[0]}.#{match[1]}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
url :homepage | |
regex(%r{href=.*?/(\d+)/(\d+)/dintch(\d+)\.zip}i) | |
strategy :page_match do |page, regex| | |
page.scan(regex).map do |match| | |
"#{match[2].split("", 2).join(".")},#{match[0]}.#{match[1]}" | |
url "https://eclecticlight.co/downloads/" | |
regex(%r{href=.*?/(\d+)/(\d+)/dintch[^"' >]*?\.zip[^>]*?>\s*Dintch\s+v?(\d+(?:\.\d+)*)[^a-z)]}i) | |
strategy :page_match do |page, regex| | |
page.scan(regex).map { |match| "#{match[2]},#{match[0]}.#{match[1]}" } |
It looks like we can check the Downloads page for these casks, unless there's a particular benefit to checking the homepage
.
The downloads page also provides the version with dots in the a
element's inner text, so we're better off matching that instead of naively trying to insert dots into the [dotless] filename version. Some of the software already has a two digit major or minor, so we can't safely make assumptions about where to insert dots.
The livechecks are checking the developer's official update list he hosts on GitHub. Why do we need to change them? |
@p-linnane I could not find any references on his site or GitHub that the repo was the official update list, although his username is close enough I guess. Also, going through the update list, it seems incomplete from the casks already added both silnite and viable are not included. Alifix and Sparsity, which I was planning on adding, are also missing from the update list. There are also several more on his website that are missing from the update list as well. I can revert the links to GitHub for those in the list if that's what you'd prefer. However, would it still make sense to use @samford suggestion and then utilize the Version Key for the regex instead of trying to assume where the dots go? |
This is the location where Howard's apps that have in-app update mechanisms check for updates. It's coded into the app to check there, so it doesn't get more official than that.
Neither
Neither of them have in-app update mechanisms either.
He has many applications that have not been updated for a number of years. We do not accept new casks for software that has not been updated in over a year. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the location where Howard's apps that have in-app update mechanisms check for updates. It's coded into the app to check there, so it doesn't get more official than that.
With that in mind, I agree that continuing to check the plist for relevant apps makes sense (I was focused on the implementation, so thanks for the sanity check). We can use the approach in the suggestion above for silnite
, since it's not in the plist file.
It would be nice to use the Version
value in the plist checks instead of naively inserting dots into the dotless version but that's a bit tricky. We can technically use a lengthy regex to extract the version
parts but it would fail if the order of the dict
elements changes or if additional elements are added.
Using the Xml
strategy to properly parse the XML and work with the dict
values [regardless of order] would be ideal. It's a little more involved than the regex approach but it should hold up better over time. I've created implementations for both approaches but using the Xml
strategy feels like the right way to handle it.
@TheMDev If you update this to remove the livecheck
block changes, I'll push a commit to take care of the aforementioned (updating the plist and silnite
livecheck
blocks accordingly).
Casks/s/silentknight.rb
Outdated
on_mojave :or_older do | ||
version "1.21,2022.06" | ||
sha256 "c1cbb734f620e073f1c08c473edaa036c2b5ccdca02baa99ca117f86c10ad505" | ||
|
||
livecheck do | ||
skip "Legacy version" | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Downloads page still lists the legacy 1.21 version. Was there a reason for removing this from the cask? If not, it seems like we should keep it as-is.
This reinstates the legacy version of `silentknight`, as there is still a link to it on the Downloads page (https://eclecticlight.co/downloads/).
`silnite` version information isn't available in the `eclecticapps.plist` file (like related casks, so we have to check the download page instead.
This also reinstates the `T2M2` alternative name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the interest of moving this forward, I rebased the branch and pushed commits to update the livecheck
blocks. I made a couple of reversions in the process:
- Restored the legacy version in the
silentknight
cask (moving thedepends_on
calls into their respective blocks), as that version is still linked on the download page. - Restored the alternative "T2M2" name in
thetimemachinemechanic
, unless there's a clear reason for dropping it.
One thing to note is that I had to add a temporary version override to the silentknight
strategy
block (version = "2.07" if version == "2.7"
), since the plist Version
is 2.7 but the filename is silentknight207.zip
. Other software in the plist that uses zero padding accounts for it in the Version
value (e.g., T2M22 has a 2.02 Version
and the filename is t2m2202.zip
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Thanks!
I was going through the process of adding a new cask for an app by eclectic light and noticed several were pulling updates from a 3rd party gist, needed zaps, wrong depends_on version, etc.