Bowrna commented on pull request #21145:
URL: https://github.com/apache/airflow/pull/21145#issuecomment-1025702462


   > This way we can simply compare two versions using bash arithmetics `$(( 
ver1 < ver2 ))` - because those are properly comparable numbers (2.2.1 < 
2.20.1) and (2.20.1-azure == 2.20.1).
   > 
   > In Python we can I think use `semver` library to make the comparision (but 
we have to see if numbers with `-azure` suffix
   
   @potiuk in semver library for the comparison major, minor, patch and 
prerelease part are equal. 
   ```
   In [5]: semver.compare('2.20.1' , '2.20.1-azure')
   Out[5]: 1
   ``` 
   I will pick only major, minor and patch to do comparison


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to