Skip to content

Commit

Permalink
Use latest tag as default if no tag is specified (#744)
Browse files Browse the repository at this point in the history
Fixes #676
  • Loading branch information
kiview committed Jun 13, 2018
1 parent 5cdd8dc commit 360702a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public DockerImageName(String name) {
versioning = new TagVersioning(remoteName.split(":")[1]);
} else {
repo = remoteName;
versioning = null;
versioning = new TagVersioning("latest");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public static String[] parameters() {
return new String[] {
"alpine:latest",
"alpine:3.6",
"alpine", // omitting the tag should work and default to latest
"alpine@sha256:8fd4b76819e1e5baac82bd0a3d03abfe3906e034cc5ee32100d12aaaf3956dc7",
"gliderlabs/alpine:latest",
"gliderlabs/alpine:3.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public void validNames() {

@Test
public void invalidNames() {
testInvalid("myname");
testInvalid(":latest");
testInvalid("/myname:latest");
testInvalid("/myname@sha256:latest");
Expand Down

0 comments on commit 360702a

Please sign in to comment.