clean releasebox

This commit is contained in:
Jeff Carr 2024-11-13 17:45:51 -06:00
parent fcd132c109
commit 3502ea0b5b
3 changed files with 28 additions and 10 deletions

View File

@ -54,7 +54,7 @@ install:
-X main.VERSION=${VERSION}"
test: build
GUIRELEASE_REASON=minor ./guireleaser
GUIRELEASE_REASON='test build' ./guireleaser
check-git-clean:
@git diff-index --quiet HEAD -- || (echo "Git repository is dirty, please commit your changes first"; exit 1)

View File

@ -67,6 +67,7 @@ func globalDisplayOptions(box *gui.Node) {
group1 = vbox.NewGroup("prep for release")
grid := group1.RawGrid()
/*
var longB *gui.Node
longB = grid.NewButton("generate go.sum files", func() {
me.Disable()
@ -88,16 +89,8 @@ func globalDisplayOptions(box *gui.Node) {
longB.Disable()
}
})
me.setBranchesToMasterB = grid.NewButton("set all branches to master", func() {
me.Disable()
defer me.Enable()
if setAllBranchesToMaster() {
// if it succeeds, disable this button
me.setBranchesToMasterB.Disable()
}
})
grid.NextRow()
*/
grid.NewButton("make prepare-release", func() {
loop := me.repos.View.ReposSortByName()
@ -112,6 +105,7 @@ func globalDisplayOptions(box *gui.Node) {
repo.Status.IncrementRevisionVersion("Nov 2024 test")
}
}
findNext()
})
grid.NextRow()

View File

@ -223,6 +223,30 @@ func createReleaseBox(box *gui.Node) {
})
grid.NextRow()
var longB *gui.Node
longB = grid.NewButton("generate go.sum files", func() {
me.Disable()
var worked bool = true
loop := me.repos.View.ReposSortByName()
for loop.Scan() {
repo := loop.Repo()
if repo.Status.Whitelist {
continue
}
ok, err := me.repos.View.CheckValidGoSum(repo)
if !ok {
log.Info("redo go.sum failed on", repo.GoPath(), err)
worked = false
}
}
log.Info("redo go.sum finished with", worked)
me.Enable()
longB.SetLabel("go.sum files created")
if worked {
longB.Disable()
}
})
grid.NextRow()
}
func buttonDisable() {