1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-09-16 09:26:52 +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

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)