Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update release naming convention #61

Merged
merged 1 commit into from
Mar 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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