1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-17 20:47:50 +02:00

fix: copy into DockerImage Artifact (#1134)

Since #1110 the artifacts are passed by reference, causing the previous
code to edit the Artifact in place, _and_ add it to the list.

Fixes: #1133
This commit is contained in:
Luit van Drongelen 2019-09-03 18:27:16 +02:00 committed by Carlos Alexandro Becker
parent ebe510a894
commit 705f66d258

View File

@ -272,7 +272,13 @@ func dockerPush(ctx *context.Context, image *artifact.Artifact) error {
return errors.Wrapf(err, "failed to push docker image: \n%s", string(out))
}
log.Debugf("docker push output: \n%s", string(out))
image.Type = artifact.DockerImage
ctx.Artifacts.Add(image)
ctx.Artifacts.Add(&artifact.Artifact{
Type: artifact.DockerImage,
Name: image.Name,
Path: image.Path,
Goarch: image.Goarch,
Goos: image.Goos,
Goarm: image.Goarm,
})
return nil
}