summaryrefslogtreecommitdiff
path: root/tagWindow.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-14 00:09:58 -0600
committerJeff Carr <[email protected]>2024-02-14 00:09:58 -0600
commitf7947b08b69b1a2f02168de511e7c8b005035221 (patch)
treeadae2c1f5b0bc546a078e1311b3e18b0a0636578 /tagWindow.go
parent95fd6ca05a28774ad374801984a4f62c202835d3 (diff)
code reorg and clean
Signed-off-by: Jeff Carr <[email protected]>
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)