summaryrefslogtreecommitdiff
path: root/tagWindow.go
diff options
context:
space:
mode:
Diffstat (limited to 'tagWindow.go')
-rw-r--r--tagWindow.go16
1 files changed, 14 insertions, 2 deletions
diff --git a/tagWindow.go b/tagWindow.go
index 1431312..c92e961 100644
--- a/tagWindow.go
+++ b/tagWindow.go
@@ -119,7 +119,9 @@ func (tagW *repoTags) newTagBox(box *gui.Node) {
tags := []string{"%(tag)", "%(*objectname)", "%(taggerdate:raw)", "%(subject)"}
format := strings.Join(tags, "_,,,_")
- err, output := tagW.rs.RunCmd([]string{"git", "for-each-ref", "--sort=taggerdate", "--format", format})
+ cmd := []string{"git", "for-each-ref", "--sort=taggerdate", "--format", format}
+ log.Info("RUNNING:", strings.Join(cmd, " "))
+ err, output := tagW.rs.RunCmd(cmd)
if err != nil {
output = "git error_,,,_a_,,,_b_,,,c"
}
@@ -147,7 +149,17 @@ func (tagW *repoTags) newTagBox(box *gui.Node) {
rTag.subject = grid.NewLabel(parts[3])
rTag.deleteB = grid.NewButton("delete", func() {
- log.Info("remove tag")
+ tagversion := parts[0]
+ log.Info("remove tag", tagversion)
+ var all [][]string
+ all = append(all, []string{"git", "tag", "--delete", tagversion})
+ all = append(all, []string{"git", "push", "--delete", "origin", tagversion})
+
+ if tagW.rs.DoAll(all) {
+ log.Info("TAG DELETED", tagW.rs.String(), tagversion)
+ } else {
+ log.Info("TAG DELETE FAILED", tagW.rs.String(), tagversion)
+ }
})
tagW.tags = append(tagW.tags, rTag)