Skip to content

Commit

Permalink
parse version handle release candidates properly
Browse files Browse the repository at this point in the history
  • Loading branch information
saif-ellafi committed Jun 29, 2019
1 parent df4ed6f commit bff13d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/scala/com/johnsnowlabs/util/Version.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ object Version {
def isInteger(str: String) = str.nonEmpty && str.forall(c => Character.isDigit(c))

def parse(str: String): Version = {
val parts = str.split('.')
val parts = str.replaceAll("-rc\\d", "").split('.')
.takeWhile(p => isInteger(p))
.map(p => p.toInt)
.toList
Expand Down

0 comments on commit bff13d7

Please sign in to comment.