Skip to content

Commit a0d7bcd

Browse files
committed
wip: push tag
1 parent f39c599 commit a0d7bcd

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

cmds/tagcmd/tag.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ func (c *Tag) Action([]string) {
8484

8585
c.git.SetRemote(c.config.Yaml.Upstream.Name, c.config.Yaml.Upstream.Protocol, c.config.Yaml.Upstream.Server, c.config.Yaml.Upstream.RepoPath)
8686

87-
8887
// Check remote. Create it if missing.
8988
options := make(core.GitRemoteConfig)
9089

@@ -102,8 +101,16 @@ func (c *Tag) Action([]string) {
102101
defer c.git.CleanRemote()
103102

104103
// Push it
104+
if err = c.git.PushTag(); err != nil {
105+
fmt.Printf("%s\n", err)
106+
os.Exit(1)
107+
}
105108

106109
// create github release in draft mode
110+
/* if err = c.github.CreateDraft(c.releaseVersion) ; err != nil {
111+
fmt.Printf("%s\n", err)
112+
os.Exit(1)
113+
}*/
107114
}
108115

109116
// Init initialize the check cli commands

core/git.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ type Git struct {
2020
protocol string
2121
host string
2222
repoPath string
23+
24+
2325
}
2426

2527
const (
@@ -209,3 +211,10 @@ func (g *Git) CleanRemote() (_ error) {
209211

210212
return err
211213
}
214+
215+
// PushTag push a tag to the remote repository
216+
func (g *Git) PushTag() (err error) {
217+
218+
219+
return
220+
}

0 commit comments

Comments
 (0)