Compare commits
2 Commits
2f9f8877e9
...
9f02fee5b5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9f02fee5b5 | ||
| c11139e078 |
@@ -1,5 +1,5 @@
|
||||
[bumpversion]
|
||||
current_version = 0.1.1
|
||||
current_version = 0.1.2
|
||||
commit = True
|
||||
tag = True
|
||||
tag_name = {new_version}
|
||||
|
||||
@@ -15,7 +15,7 @@ steps:
|
||||
path: /var/run/docker.sock
|
||||
settings:
|
||||
dockerfile: Dockerfile
|
||||
tags: 0.1.1
|
||||
tags: 0.1.2
|
||||
force_tag: true
|
||||
registry: registry.halfakop.ru
|
||||
repo: registry.halfakop.ru/golang/bumpversion
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# BumpVersion v0.1.1
|
||||
# BumpVersion v0.1.2
|
||||
|
||||
[](https://drone.halfakop.ru/rad/bumpversion)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -162,7 +162,7 @@ func resolveFlag(positive, negative *bool, defaultValue bool) bool {
|
||||
// Версия приложения
|
||||
const (
|
||||
AppName = "BumpVersion"
|
||||
AppVersion = "0.1.1"
|
||||
AppVersion = "0.1.2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
Reference in New Issue
Block a user