Skip to content

Commit

Permalink
fix: copy into DockerImage Artifact
Browse files Browse the repository at this point in the history
Since goreleaser#1110 the artifacts are passed by reference, causing the previous
code to edit the Artifact in place, _and_ add it to the list.

Fixes: goreleaser#1133
  • Loading branch information
Luit committed Sep 3, 2019
1 parent ebe510a commit 1bc2332
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions internal/pipe/docker/docker.go
Expand Up @@ -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
}

0 comments on commit 1bc2332

Please sign in to comment.