0
0
mirror of https://github.com/thegeeklab/git-sv.git synced 2024-11-21 22:10:39 +00:00

fix: print error output at git sv tag

This commit is contained in:
Beatriz Vieira 2021-09-24 17:49:58 -03:00
parent 08e51ae2c3
commit 1cb825c4b0

View File

@ -128,12 +128,15 @@ func (g GitImpl) Tag(version semver.Version) error {
tagMsg := fmt.Sprintf("Version %d.%d.%d", version.Major(), version.Minor(), version.Patch()) tagMsg := fmt.Sprintf("Version %d.%d.%d", version.Major(), version.Minor(), version.Patch())
tagCommand := exec.Command("git", "tag", "-a", tag, "-m", tagMsg) tagCommand := exec.Command("git", "tag", "-a", tag, "-m", tagMsg)
if err := tagCommand.Run(); err != nil { if out, err := tagCommand.CombinedOutput(); err != nil {
return err return combinedOutputErr(err, out)
} }
pushCommand := exec.Command("git", "push", "origin", tag) pushCommand := exec.Command("git", "push", "origin", tag)
return pushCommand.Run() if out, err := pushCommand.CombinedOutput(); err != nil {
return combinedOutputErr(err, out)
}
return nil
} }
// Tags list repository tags. // Tags list repository tags.