From c11139e078f36f47b59977468e7fc3523f580244 Mon Sep 17 00:00:00 2001 From: Ruslan Popov Date: Fri, 4 Apr 2025 01:17:34 +0300 Subject: [PATCH] Right tag message --- src/git.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/git.go b/src/git.go index 28acdbc..9d3fee5 100644 --- a/src/git.go +++ b/src/git.go @@ -69,6 +69,8 @@ func gitTag(bc *BumpConfig, newVersion string) { log.Printf("Current HEAD is %s\n", headRef.Hash()) // Создаем тег на текущем коммите (HEAD) + commitMsg := strings.ReplaceAll(bc.Message, "{current_version}", bc.CurrentVersion) + commitMsg = strings.ReplaceAll(commitMsg, "{new_version}", newVersion) tagName := strings.ReplaceAll(bc.TagName, "{new_version}", newVersion) _, err = repo.CreateTag(tagName, headRef.Hash(), &git.CreateTagOptions{ Tagger: &object.Signature{ @@ -76,7 +78,7 @@ func gitTag(bc *BumpConfig, newVersion string) { Email: os.Getenv("GIT_EMAIL"), When: time.Now(), }, - Message: "Tag is created with go-git", + Message: commitMsg, }) if err != nil { log.Fatalf("Tag creation error: %v", err)