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:
parent
cbb09b89fd
commit
a0f0d01a81
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user