Handle leading zeros in APK package versions in the semver_dialects gem
Summary
We omitted the handling of leading zeros in the MR gitlab-org/ruby/gems/semver_dialects!97 (merged) for Update semver_dialects gem to support apk opera... (#428703 - closed).
This issue serves as a follow-up to address this scenario.
Please refer to this thread for the discussion.
Implementation Plan
- Handle leading zeros scenario
- For versions with leading zeros before the first
.
, eg006
they will be compared as a digit ie leading zeros would be removed. See context. - For versions with leading zeros after the first
.
, they will be compared using the apk_blob_sort function, see code suggestion.
- For versions with leading zeros before the first
- Remove leading zero test cases that were commented out by removing this code and this code from the
convert_apk_test_cases.rb
script. Re-run the script to generate the spec/apk_test_cases.rb file. - Update documentation to remove note that leading zeros is not supported.
Edited by Shao Ming Tan