0
0
mirror of https://github.com/thegeeklab/git-sv.git synced 2024-11-25 07:30:38 +00:00

fix: git tag command

This commit is contained in:
Beatriz Vieira 2019-12-04 19:50:02 -03:00
parent 013ef66372
commit 026a45b033
2 changed files with 3 additions and 3 deletions

View File

@ -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()) fmt.Printf("%d.%d.%d\n", nextVer.Major(), nextVer.Minor(), nextVer.Patch())
if err := git.Tag(nextVer); err != nil { 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 return nil
} }

View File

@ -74,9 +74,9 @@ func (g GitImpl) Log(lastTag string) ([]GitCommitLog, error) {
// Tag create a git tag // Tag create a git tag
func (g GitImpl) Tag(version semver.Version) error { func (g GitImpl) Tag(version semver.Version) error {
tag := fmt.Sprintf(g.tagPattern, version.Major(), version.Minor(), version.Patch()) 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 { if err := tagCommand.Run(); err != nil {
return err return err
} }