Adjust PEVersionTask regex to allow any commit hash length
This commit is contained in:
1 file changed
+1
-1
@@ -61,7 +61,7 @@ abstract class PEVersionTask : DefaultTask() {
|
||||
val snapShot: Boolean
|
||||
) {
|
||||
companion object {
|
||||
private val REGEX = Regex("""(\d+)\.(\d+)\.(\d+)(?:\+[0-9a-f]{8,})?(-SNAPSHOT)?""")
|
||||
private val REGEX = Regex("""(\d+)\.(\d+)\.(\d+)(?:\+[0-9a-f]+)?(-SNAPSHOT)?""")
|
||||
|
||||
fun fromString(version: String): Version {
|
||||
val match = REGEX.matchEntire(version) ?: throw IllegalArgumentException("Invalid version: $version")
|
||||
|
||||
Reference in new issue
Block a user