compare Semantics
fun compareSemantics(currentVersion: String, newVersion: String, comparison: Comparison = Comparison.NEW): Boolean
Compare the given new version against the given current version, depending on comparison type EQUAL
, NEW
, or EQUAL_OR_NEW
. Checks are performed with the semantic release-formatting, e.g. 1.2.3, 2.3.4, 6.6.6
Author
Griefed
Return
Boolean. Returns true
if the new version is indeed newer than the current version. Otherwise false
.
Parameters
current Version
Current version to check against newVersion
.
new Version
New version to check against currentVersion
.
comparison
Comparison level. Either EQUAL
, NEW
, or EQUAL_OR_NEW
.
Throws
Thrown if the passed currentVersion
or newVersion
can not be parsed into integers.