public class VersionUtils extends Object
| Constructor and Description |
|---|
VersionUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
completeIncremental(String version)
It completes the incremental version number with 0 in the event the version provided has the form x to become x.0.0 or x.y to
become x.y.0
|
static String |
getBaseVersion(String version)
Returns the base version, i.e., in the format major.minor.patch.
|
static String |
getMajor(String version)
Returns the version major.
|
static Boolean |
isVersionGreaterOrEquals(String version1,
String version2)
Validates if
version1 is greater or equal than version2 |
static Boolean |
isVersionValid(String version)
Validates if a version complies with semantic versioning specification
|
public static Boolean isVersionValid(String version)
version - the version to validatepublic static Boolean isVersionGreaterOrEquals(String version1, String version2) throws ValidationException
version1 is greater or equal than version2version1 - version2 - ValidationExceptionpublic static String completeIncremental(String version) throws ValidationException
version - the version to be completedValidationExceptionpublic static String getBaseVersion(String version)
version - Copyright © 2018 MuleSoft Inc. All rights reserved.