diff --git a/Makefile b/Makefile index f69416a..0bde9f7 100644 --- a/Makefile +++ b/Makefile @@ -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) diff --git a/globalDisplayOptions.go b/globalDisplayOptions.go index 69dd5ad..514a48f 100644 --- a/globalDisplayOptions.go +++ b/globalDisplayOptions.go @@ -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() diff --git a/releaseBox.go b/releaseBox.go index 7604236..351717a 100644 --- a/releaseBox.go +++ b/releaseBox.go @@ -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() {