Add support for semantic versioning in zopen-install #1153
Add support for semantic versioning in zopen-install #1153sachintu47 wants to merge 3 commits intozopencommunity:mainfrom
Conversation
- Support semantic operators (>, >=, <, <=) in addition to '=' - Use jq-based numeric array comparison for accurate semantic versioning - Implement version-aware sorting to correctly prioritize versions (e.g., 1.10 over 1.9) - Maintain prefix matching behavior for the '=' operator - Update port validation to recognize and handle all semantic operators
|
augment review |
🤖 Augment PR SummarySummary: This PR extends Changes:
Technical Notes: Version comparison pads arrays to a fixed width and uses date/tag as tie-breakers when versions compare equal. 🤖 Was this summary useful? React with 👍 or 👎 |
|
augment review |
|
augment review |
|
augment review |
|
augment review |
|
augment review |
|
augment review |
|
augment review |
| fi | ||
|
|
||
| # Convert requested version string to a JSON array of numbers for jq | ||
| req_v_json=$(echo "${versioned#v}" | tr '.' '\n' | jq -R 'tonumber' | jq -s -c .) |
There was a problem hiding this comment.
The version validation above allows alphanumeric/hyphen suffixes (e.g. 1.2.3-rc1), but req_v_json is built via jq -R 'tonumber' and will error on any non-numeric segment. This makes some “valid” version inputs fail at runtime during release selection, so it may be worth ensuring the accepted version format matches what the jq parsing/comparison can actually handle.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
What type of PR is this? (check all applicable)
Category
Description
Related Issues
[optional] Are there any post-deployment tasks or follow-up actions required?