skgandikota/CompareVersions
Compare two semantic version strings. Outputs diff type, whether version bumped, and comparison results.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| current | The current/new version string (e.g. "2.1.0", "v2.1.0-beta.1"). | yes | — |
| previous | The previous/old version string to compare against. | yes | — |
Outputs
| name | description |
|---|---|
| diff | The type of change: major, minor, patch, prerelease, none, or downgrade. |
| bumped | Whether the version was bumped (true/false). |
| is_major | Whether the change is a major bump (true/false). |
| is_minor | Whether the change is a minor bump (true/false). |
| is_patch | Whether the change is a patch bump (true/false). |
| is_prerelease | Whether the current version is a prerelease (true/false). |
| current_major | Major version of current. |
| current_minor | Minor version of current. |
| current_patch | Patch version of current. |
| previous_major | Major version of previous. |
| previous_minor | Minor version of previous. |
| previous_patch | Patch version of previous. |
| result | Comparison result: 1 if current > previous, -1 if current < previous, 0 if equal. |