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
livecheck: split cask versions into sub-versions #10376
livecheck: split cask versions into sub-versions #10376
Conversation
Review period will end on 2021-01-21 at 17:31:33 UTC. |
e9b17e3
to
f85b177
Compare
f85b177
to
9edb648
Compare
Review period ended. |
when Formula | ||
[version] | ||
when Cask::Cask | ||
version.to_s.split(/[,:]/).map { |s| Version.new(s) } |
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 blocking but if there's a chance for tests for any of this that might be nice?
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.
We’re considering getting rid of :
in version
. Pointing that out so there’s something to link to from the other issue, and we can revisit this code when the time comes.
# A formula or cask version, split into its component sub-versions. | ||
# | ||
# @api private | ||
class LivecheckVersion |
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.
class LivecheckVersion | |
class Version |
or rename the file livecheck_version.rb
maybe?
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?brew man
locally and committed any changes?Follow-up to #10348
Livecheck now correctly reports
15.0.1,9
as newer than15,36
, but now15.0.1,9.1
is reported as equal to15.0.1,9
This PR adds the
LivecheckVersion
class that compares the individual sub-versions of a formula/cask version, similar to how theVersion
class compares version tokens.When comparing
15.0.1,9
and15,36
:15.0.1
>15
15.0.1,9
>15,36
When comparing
15.0.1,9.1
and15.0.1,9
:15.0.1
==15.0.1
9.1
>9
15.0.1,9.1
>15.0.1,9
Related: Homebrew/homebrew-cask#98130