[style] refactor complex version comparison
[style] refactor complex version comparison

I also think I fixed a bug in the comparison that
was previously a less than, old line number 417.

mani-monaj/ros_buildfarm,ros-infrastructure/ros_buildfarm,clearpathrobotics/ros_buildfarm,clearpathrobotics/ros_buildfarm,ruffsl/ros_buildfarm,mani-monaj/ros_buildfarm,mistoll/ros_buildfarm,ros-infrastructure/ros_buildfarm,ros-infrastructure/ros_buildfarm,mistoll/ros_buildfarm,mani-monaj/ros_buildfarm,clearpathrobotics/ros_buildfarm,130s/ros_buildfarm,130s/ros_buildfarm,mistoll/ros_buildfarm,130s/ros_buildfarm,ruffsl/ros_buildfarm,ruffsl/ros_buildfarm