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

fix: improve docker logs and errors (#1519)

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
This commit is contained in:
Carlos Alexandro Becker 2020-05-14 14:28:53 -03:00 committed by GitHub
parent 73e60f6f1a
commit 0cd40a42da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -121,6 +121,7 @@ func doRun(ctx *context.Context) error {
var binaries = ctx.Artifacts.Filter(artifact.And(filters...)).List()
// TODO: not so good of a check, if one binary match multiple
// binaries and the other match none, this will still pass...
log.WithField("binaries", binaries).Debug("found binaries")
if len(binaries) != len(docker.Binaries) {
return fmt.Errorf(
"%d binaries match docker definition: %v: %s_%s_%s, should be %d",
@ -257,7 +258,7 @@ func dockerBuild(ctx *context.Context, root string, images, flags []string) erro
log.WithField("cmd", cmd.Args).WithField("cwd", cmd.Dir).Debug("running")
out, err := cmd.CombinedOutput()
if err != nil {
return errors.Wrapf(err, "failed to build docker image: \n%s", string(out))
return errors.Wrapf(err, "failed to build docker image: %s: \n%s", images[0], string(out))
}
log.Debugf("docker build output: \n%s", string(out))
return nil