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

refactor: dockefile tmpl

This commit is contained in:
Carlos Alexandro Becker 2023-07-17 02:31:00 +00:00
parent cbb09b89fd
commit a0f0d01a81
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -171,11 +171,15 @@ 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 {
if err := tmpl.New(ctx).ApplyAll(
&docker.Dockerfile,
); err != nil {
return err
}
if err := gio.Copy(dockerfile, filepath.Join(tmp, "Dockerfile")); err != nil {
if err := gio.Copy(
docker.Dockerfile,
filepath.Join(tmp, "Dockerfile"),
); err != nil {
return fmt.Errorf("failed to copy dockerfile: %w", err)
}