make a tag list

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-02-09 04:53:26 -06:00
parent fb162b968a
commit cec7bb8b07
1 changed files with 12 additions and 3 deletions

View File

@ -41,9 +41,7 @@ func makeTagWindow() *tagWindow {
tagW.box = tagW.win.Box()
tagW.group = tagW.box.NewGroup("tags")
tagW.group.NewButton("list tags", func() {
// dumpVersions()
})
tagW.grid = tagW.box.RawGrid()
tagW.group.NewButton("list all tags", func() {
me.autotypistWindow.Disable()
@ -67,6 +65,11 @@ func makeTagWindow() *tagWindow {
me.autotypistWindow.Disable()
defer me.autotypistWindow.Enable()
for _, repo := range me.allrepos {
if repo.String() == "go.wit.com/log" {
// only do log for now
} else {
// continue
}
tagsW := repo.status.TagsW
if tagsW == nil {
repo.status.TagWindow()
@ -76,6 +79,12 @@ func makeTagWindow() *tagWindow {
tagsW.PruneSmart()
deleteTags := tagsW.List()
for _, t := range deleteTags {
tagW.grid.NewLabel(t.TagString())
tagW.grid.NewLabel(repo.status.String())
tagW.grid.NewButton("delete", func() {
tagsW.Delete(t)
})
tagW.grid.NextRow()
if me.autoDryRun.Checked() {
log.Info("delete tag --dry-run:", t.TagString(), "from", repo.status.String())
} else {