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

fix: parse commit hash of GPG signed commit (#953)

This commit is contained in:
Andrew Martin 2019-02-06 20:14:04 +01:00 committed by Carlos Alexandro Becker
parent dd692bdf7d
commit a6b60ce74b
2 changed files with 5 additions and 0 deletions

View File

@ -18,6 +18,10 @@ func IsRepo() bool {
// Run runs a git command and returns its output or errors
func Run(args ...string) (string, error) {
// TODO: use exex.CommandContext here and refactor.
var extraArgs = []string{
"-c", "log.showSignature=false",
}
args = append(extraArgs, args...)
/* #nosec */
var cmd = exec.Command("git", args...)
log.WithField("args", args).Debug("running git")

View File

@ -48,6 +48,7 @@ func fakeGit(args ...string) (string, error) {
"-c", "user.name='GoReleaser'",
"-c", "user.email='test@goreleaser.github.com'",
"-c", "commit.gpgSign=false",
"-c", "log.showSignature=false",
}
allArgs = append(allArgs, args...)
return git.Run(allArgs...)