We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c199129 commit 3bf7049Copy full SHA for 3bf7049
macros/src/main/scala/swaydb/macros/VersionReader.scala
@@ -83,15 +83,18 @@ object VersionReader {
83
}
84
85
//get major.minor.revision from version.
86
- val regex = """(\d+)\.(\d+)\.(\d+)""".r
+ val regex = """(\d+)\.(\d+)\.?(\d+)?""".r
87
88
val (major, minor, revision) =
89
regex.findFirstMatchIn(versionString) match {
90
case Some(value) =>
91
val major = value.group(1)
92
val minor = value.group(2)
93
val revision = value.group(3)
94
- (major.toInt, minor.toInt, revision.toInt)
+ if (revision == null)
95
+ (major.toInt, minor.toInt, 0)
96
+ else
97
+ (major.toInt, minor.toInt, revision.toInt)
98
99
case None =>
100
c.abort(
0 commit comments