module

Mangrullo::VersionUtils

Utility methods for version comparison and parsing

Class methods

commit_hash?(version : String | Nil) : Bool

Check if version is likely a commit hash

Source
compare_versions(version1 : String | Nil, version2 : String | Nil) : Int32

Compare two version strings Returns: 1 if version1 > version2, 0 if equal, -1 if version1 < version2

Source
display_version(version : String | Nil) : String

Format version for display

Source
equal?(version1 : String | Nil, version2 : String | Nil) : Bool

Check if versions are equal

Source
greater_than?(version1 : String | Nil, version2 : String | Nil) : Bool

Check if version1 is greater than version2

Source
less_than?(version1 : String | Nil, version2 : String | Nil) : Bool

Check if version1 is less than version2

Source
major_update?(local_version : String | Nil, remote_version : String | Nil) : Bool

Check if this is a major version update

Source
major_version(version : String | Nil) : Int32 | Nil

Get the major version number

Source
minor_version(version : String | Nil) : Int32 | Nil

Get the minor version number

Source
parse_version(version : String | Nil) : Array(Int32)

Parse a version string into numeric parts

Source
patch_version(version : String | Nil) : Int32 | Nil

Get the patch version number

Source