-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Conversation
sha256 :no_check | ||
|
||
# static.adamretter.org.uk/exist-nightly was verified as official when first introduced to the cask | ||
url do |
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.
That’s not really the purpose of url do
, and users do prefer versioned builds (which this has) over latest
.
That said, up-to-date nightlies with no sha256
are more useful than out-of-date nightlies, so I don’t really have an issue with this regarding nightlies only.
But since this isn’t something we usually do, I’d like some further input from @caskroom/maintainers. I’ve 👍 my own post to show agreement and we can easily count it, if you prefer that way.
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.
@vitorgalvao Thank you for your review and for taking the time to explain this principle. If this PR is good for you and the other maintainers, accepting this PR would be a real help to our community. Thanks in advance.
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.
Should be OK, imo - could be an exception for the -versions repo only
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.
Not familiar with ruby - are those two requires inbuilt?
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.
are those two requires inbuilt?
@adidalal Good catch! While open-uri
is built into the system Ruby, nokogiri
appears not to.
The dependency on nokogiri
needs to go; luckily, we’ve had ad-hoc workarounds in the past where regular expressions did that particular job well.
(Yes, the audacity
formula did break often, albeit for unrelated reasons. And no: regular expressions are not a valid general-purpose solution.)
Okay, I'll adapt the cask to remove Nokogiri. I will work with the creator of the nightly site to pre-sort the entries so the newest is consistently on top. |
@joewiz That’s a good point; I agree it’d be best to have the source reliably sorted. In case we cannot have this for whatever reason, something like
might do the trick for unsorted entries. Edit: of course it’s |
Thanks, Claudia! Unfortunately the order of the rows in the table is random, so until the nightly server fixes the ordering problem (I've already reached out), some date sorting is needed. Or is there a way to do this via regex? At worst, we should be able to fix this server side before long. |
@joewiz If you run the example code, you’re going to discover it already takes care of the sorting.
To pick the pair with the most recent date, the |
@claui Now I see! Thanks so much for this great suggestion! Revised PR to come shortly. |
- Replaced nokogiri with io.read.scan as proposed by @claui. - Addressed all brew cask style concerns - Tested the resulting script and confirmed that it successfully grabbed the latest nightly
Okay, the revised PR is in, and CI and my own tests are passing. |
Like @vitorgalvao already pointed out (and anticipated back when we introduced the feature), I feel this particular use of |
@claui @adidalal @vitorgalvao Great to hear that this PR proved to be a broader contribution. Thank you so much for all of your help! |
After making all changes to the cask:
brew cask audit --download {{cask_file}}
is error-free.brew cask style --fix {{cask_file}}
reports no offenses.Additionally, if adding a new cask:
Note: In using "nightly" suffix, I followed the nomenclature at https://github.com/caskroom/homebrew-versions/blob/master/README.md and followed the example of other nightly casks, e.g., d7ac7c4.
brew cask install {{cask_file}}
worked successfully.Note: In constructing the URL to the latest nightly, I followed the example of https://github.com/caskroom/homebrew-versions/blob/master/Casks/vlc-nightly.rb.
brew cask uninstall {{cask_file}}
worked successfully.