linuxkit pkg: make ":latest" for non-git packages explicit

Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
Ian Campbell 2017-10-20 17:18:00 +01:00
parent 991bfd2794
commit ba3cc2fc6d

View File

@ -198,11 +198,11 @@ func (p Pkg) ReleaseTag(release string) (string, error) {
// Tag returns the tag to use for the package // Tag returns the tag to use for the package
func (p Pkg) Tag() string { func (p Pkg) Tag() string {
r := p.org + "/" + p.image t := p.hash
if p.hash != "" { if t == "" {
r += ":" + p.hash t = "latest"
} }
return r return p.org + "/" + p.image + ":" + t
} }
// TrustEnabled returns true if trust is enabled // TrustEnabled returns true if trust is enabled