File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ type Service interface {
15
15
IsRepoClean () (bool , error )
16
16
CreateTag (version string ) error
17
17
Push () error
18
+ PushTag (name string ) error
18
19
AddVersionChanges (filename string ) error
19
20
CommitVersionChanges (version string ) error
20
21
}
@@ -62,6 +63,14 @@ func (s service) Push() error {
62
63
return errors .Wrap (err , fmt .Sprintf ("pkg(git) Push(): %s" , stderr .String ()))
63
64
}
64
65
66
+ func (s service ) PushTag (version string ) error {
67
+ cmd := exec .Command (s .gitPath , "push" , "origin" , "v" + version )
68
+ var stderr bytes.Buffer
69
+ cmd .Stderr = & stderr
70
+ err := cmd .Run ()
71
+ return errors .Wrap (err , fmt .Sprintf ("pkg(git) PushTag(): %s" , stderr .String ()))
72
+ }
73
+
65
74
func (s service ) AddVersionChanges (filename string ) error {
66
75
repoPath , err := s .GitRepoPath ()
67
76
if err != nil {
You can’t perform that action at this time.
0 commit comments