Skip to content

Commit

Permalink
Merge pull request #61 from melgene/new_version_convention
Browse files Browse the repository at this point in the history
Update release naming convention
  • Loading branch information
marcus-drake authored Mar 2, 2017
2 parents 3e33a7f + bee4734 commit 2bb33d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/scala/sbtdocker/DockerVersion.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ object DockerVersion extends RegexParsers {
}

private val positiveWholeNumber: Parser[Int] = {
("0".r | """[1-9]?\d*""".r).map(_.toInt).withFailureMessage("non-negative integer value expected")
"""\d+""".r.map(_.toInt).withFailureMessage("non-negative integer value expected")
}

private val parser: Parser[DockerVersion] = {
Expand Down
1 change: 1 addition & 0 deletions src/test/scala/sbtdocker/DockerVersionSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class DockerVersionSpec extends FlatSpec with Matchers {
DockerVersion.parseVersion("1.0.0-SNAPSHOT") shouldEqual DockerVersion(1,0,0)
DockerVersion.parseVersion("1.2.3") shouldEqual DockerVersion(1,2,3)
DockerVersion.parseVersion("1.2.3-rc3") shouldEqual DockerVersion(1,2,3)
DockerVersion.parseVersion("17.03.0-ce") shouldEqual DockerVersion(17,3,0)
}

it should "not parse" in {
Expand Down

0 comments on commit 2bb33d1

Please sign in to comment.