mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-17 20:47:50 +02:00
refactor: simplify code
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
This commit is contained in:
parent
5f5f263aa8
commit
f4d4dc65ec
1
go.mod
1
go.mod
@ -7,7 +7,6 @@ require (
|
||||
github.com/Masterminds/semver/v3 v3.0.3
|
||||
github.com/apex/log v1.1.1
|
||||
github.com/aws/aws-sdk-go v1.25.11
|
||||
github.com/caarlos0/cmdstream v0.1.0
|
||||
github.com/caarlos0/ctrlc v1.0.0
|
||||
github.com/campoy/unique v0.0.0-20180121183637-88950e537e7e
|
||||
github.com/fatih/color v1.7.0
|
||||
|
2
go.sum
2
go.sum
@ -44,8 +44,6 @@ github.com/aws/aws-sdk-go v1.25.11/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpi
|
||||
github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I=
|
||||
github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb h1:m935MPodAbYS46DG4pJSv7WO+VECIWUQ7OJYSoTrMh4=
|
||||
github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb/go.mod h1:PkYb9DJNAwrSvRx5DYA+gUcOIgTGVMNkfSCbZM8cWpI=
|
||||
github.com/caarlos0/cmdstream v0.1.0 h1:Y9EOUEp0e7Lh09vaVXq0psc6gqUYXnLzfD+WAciRW50=
|
||||
github.com/caarlos0/cmdstream v0.1.0/go.mod h1:JV0/yP9NA7jR+rYk7gDk0K43FxcxaduXpGhYEe8olNc=
|
||||
github.com/caarlos0/ctrlc v1.0.0 h1:2DtF8GSIcajgffDFJzyG15vO+1PuBWOMUdFut7NnXhw=
|
||||
github.com/caarlos0/ctrlc v1.0.0/go.mod h1:CdXpj4rmq0q/1Eb44M9zi2nKB0QraNKuRGYGrrHhcQw=
|
||||
github.com/campoy/unique v0.0.0-20180121183637-88950e537e7e h1:V9a67dfYqPLAvzk5hMQOXYJlZ4SLIXgyKIE+ZiHzgGQ=
|
||||
|
@ -8,7 +8,6 @@ import (
|
||||
"reflect"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/cmdstream"
|
||||
|
||||
"github.com/goreleaser/goreleaser/internal/artifact"
|
||||
"github.com/goreleaser/goreleaser/internal/deprecate"
|
||||
@ -117,10 +116,10 @@ func signone(ctx *context.Context, cfg config.Sign, a *artifact.Artifact) (*arti
|
||||
// tells the scanner to ignore this.
|
||||
// #nosec
|
||||
cmd := exec.CommandContext(ctx, cfg.Cmd, args...)
|
||||
cmd.Stderr = logext.NewWriter(log.WithField("cmd", cfg.Cmd))
|
||||
cmd.Stdout = cmd.Stderr
|
||||
log.WithField("cmd", cmd.Args).Info("signing")
|
||||
if err := cmdstream.Stream(
|
||||
cmd, logext.NewWriter(log.WithField("cmd", cfg.Cmd)),
|
||||
); err != nil {
|
||||
if err := cmd.Run(); err != nil {
|
||||
return nil, fmt.Errorf("sign: %s failed", cfg.Cmd)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user