Closed scpeters closed 10 months ago
testing with https://build.osrfoundation.org/job/generic-release-homebrew_pull_request_updater/1400/
which is a manual re-run of https://build.osrfoundation.org/job/generic-release-homebrew_pull_request_updater/1391 with the VERSION
field changed from 1.0.0~pre2
to 1.0.0~pre3
testing with
https://build.osrfoundation.org/job/generic-release-homebrew_pull_request_updater/1400/
which is a manual re-run of https://build.osrfoundation.org/job/generic-release-homebrew_pull_request_updater/1391 with the
VERSION
field changed from1.0.0~pre2
to1.0.0~pre3
the resulting pull request ( https://github.com/osrf/homebrew-simulation/pull/2393 ) uses a version string with -
instead of ~
as intended, and brew CI appears happy, so I consider this a successful test
The point for using ~
in the Debian versions is to get x.y.z~
resolved as lower than x.y.z
so we can use x.y.z~pre1
before x.y.z
. I can not find any reference about what system is brew using for comparing versions but we would need that behavior to be preserved when changing the ~
The point for using
~
in the Debian versions is to getx.y.z~
resolved as lower thanx.y.z
so we can usex.y.z~pre1
beforex.y.z
. I can not find any reference about what system is brew using for comparing versions but we would need that behavior to be preserved when changing the~
brew
uses custom logic in its version.rb file. I've tested it a bit interactively using brew ruby -e
, and it looks like it works. I'll post some output from these commands in a separate comment
$ brew ruby -e 'puts Version.new("1.0") == Version.new("1.0")'
true
$ brew ruby -e 'puts Version.new("1.0") == Version.new("1.0.0")'
true
$ brew ruby -e 'puts Version.new("1.0") == Version.new("1.0.0.1")'
false
$ brew ruby -e 'puts Version.new("1.0") == Version.new("1.0-pre1")'
false
$ brew ruby -e 'puts Version.new("1.0") > Version.new("1.0-pre1")'
true
The point for using
~
in the Debian versions is to getx.y.z~
resolved as lower thanx.y.z
so we can usex.y.z~pre1
beforex.y.z
. I can not find any reference about what system is brew using for comparing versions but we would need that behavior to be preserved when changing the~
@j-rivero I believe I've responded to this comment
The point for using
~
in the Debian versions is to getx.y.z~
resolved as lower thanx.y.z
so we can usex.y.z~pre1
beforex.y.z
. I can not find any reference about what system is brew using for comparing versions but we would need that behavior to be preserved when changing the~
@j-rivero I believe I've responded to this comment
Thanks for checking, seems fine to me.
Sanitize ~ characters from the brew version string.
Follow up to https://github.com/osrf/homebrew-simulation/issues/2390.