Skip to content

Commit

Permalink
Fix docker server version parsing (#1108)
Browse files Browse the repository at this point in the history
Add support for numbers in the release version. This allows version
detection to parse server version of the form '18.03.0-ce-rc3'.
  • Loading branch information
jalaziz authored and muuki88 committed Mar 17, 2018
1 parent fdcf08a commit 3c44f30
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import scala.util.matching.Regex
case class DockerVersion(major: Int, minor: Int, patch: Int, release: Option[String])

object DockerVersion {
private val DockerVersionPattern: Regex = "^'?([0-9]+).([0-9]+).([0-9]+)-?([-a-z]+)?'?$".r
private val DockerVersionPattern: Regex = "^'?([0-9]+).([0-9]+).([0-9]+)-?([-a-z0-9]+)?'?$".r

def parse(version: String): Option[DockerVersion] =
Option(version).collect {
Expand Down

0 comments on commit 3c44f30

Please sign in to comment.