1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-10 03:47:03 +02:00
This commit is contained in:
Carlos Alexandro Becker 2017-09-22 09:26:19 -03:00
parent 26d1bc9d01
commit 2e31f04bf9
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -80,7 +80,7 @@ func process(ctx *context.Context, folder string, docker config.Docker, binary c
}
}
// TODO: improve this so it can log into to stdout
// TODO: improve this so it can log it to stdout
if !ctx.Publish {
return pipeline.Skip("--skip-publish is set")
}
@ -90,13 +90,14 @@ func process(ctx *context.Context, folder string, docker config.Docker, binary c
if err := dockerPush(image); err != nil {
return err
}
if docker.Latest {
if err := dockerPush(latest); err != nil {
return err
}
}
ctx.AddDocker(image)
return nil
if !docker.Latest {
return nil
}
if err := dockerTag(image, latest); err != nil {
return err
}
return dockerPush(latest)
}
func dockerBuild(root, dockerfile, image string) error {
@ -123,7 +124,7 @@ func dockerTag(image, tag string) error {
return nil
}
func dockerPush(image string) error {
func dockerPush(images ...string) error {
log.WithField("image", image).Info("pushing docker image")
var cmd = exec.Command("docker", "push", image)
log.WithField("cmd", cmd).Debug("executing")