mirror of
https://github.com/thegeeklab/git-sv.git
synced 2024-11-21 22:10:39 +00:00
fix: git tag command
This commit is contained in:
parent
013ef66372
commit
026a45b033
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user