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

fix: revert unwanted change in docker.go

refs #3414
This commit is contained in:
Carlos A Becker 2022-10-05 11:11:01 -03:00
parent b88e836d3a
commit d88600aca7
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -154,6 +154,14 @@ func process(ctx *context.Context, docker config.Docker, artifacts []*artifact.A
log := log.WithField("image", images[0])
log.Debug("tempdir: " + tmp)
dockerfile, err := tmpl.New(ctx).Apply(docker.Dockerfile)
if err != nil {
return err
}
if err := gio.Copy(dockerfile, filepath.Join(tmp, "Dockerfile")); err != nil {
return fmt.Errorf("failed to copy dockerfile: %w", err)
}
for _, file := range docker.Files {
if err := os.MkdirAll(filepath.Join(tmp, filepath.Dir(file)), 0o755); err != nil {
return fmt.Errorf("failed to copy extra file '%s': %w", file, err)