From 026a45b033fe4e79e15895f245decc69d132ef7e Mon Sep 17 00:00:00 2001 From: Beatriz Vieira Date: Wed, 4 Dec 2019 19:50:02 -0300 Subject: [PATCH] fix: git tag command --- cmd/git-sv/handlers.go | 2 +- sv/git.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/git-sv/handlers.go b/cmd/git-sv/handlers.go index 1b66cee..bb9f0d8 100644 --- a/cmd/git-sv/handlers.go +++ b/cmd/git-sv/handlers.go @@ -102,7 +102,7 @@ func tagHandler(git sv.Git, semverProcessor sv.SemVerCommitsProcessor, rnProcess fmt.Printf("%d.%d.%d\n", nextVer.Major(), nextVer.Minor(), nextVer.Patch()) if err := git.Tag(nextVer); err != nil { - return fmt.Errorf("error generate tag version: %s, message: %v", nextVer.String(), err) + return fmt.Errorf("error generating tag version: %s, message: %v", nextVer.String(), err) } return nil } diff --git a/sv/git.go b/sv/git.go index 28e7f4e..df5cfa9 100644 --- a/sv/git.go +++ b/sv/git.go @@ -74,9 +74,9 @@ func (g GitImpl) Log(lastTag string) ([]GitCommitLog, error) { // Tag create a git tag func (g GitImpl) Tag(version semver.Version) error { tag := fmt.Sprintf(g.tagPattern, version.Major(), version.Minor(), version.Patch()) - tagMsg := fmt.Sprintf("-v \"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, tagMsg) + tagCommand := exec.Command("git", "tag", "-a", tag, "-m", tagMsg) if err := tagCommand.Run(); err != nil { return err }