summaryrefslogtreecommitdiff
path: root/releaseWindow.go
diff options
context:
space:
mode:
Diffstat (limited to 'releaseWindow.go')
-rw-r--r--releaseWindow.go34
1 files changed, 26 insertions, 8 deletions
diff --git a/releaseWindow.go b/releaseWindow.go
index d9e3f40..62c8953 100644
--- a/releaseWindow.go
+++ b/releaseWindow.go
@@ -34,6 +34,7 @@ type releaseStruct struct {
checkDirtyB *gui.Node
makeRedomodB *gui.Node
sendVersionB *gui.Node
+ checkSafeB *gui.Node
}
func createReleaseWindow() {
@@ -60,11 +61,17 @@ func createReleaseWindow() {
release.grid.NewButton("next repo", func() {
log.Info("find the next repo to release here")
if findNextDirty() {
- log.Info("found a dirty repo")
- } else {
- findNextRepo()
+ log.Info("findNextDirty() found a repo")
+ return
+ }
+ if findNextRepo() {
+ log.Info("findNextRepo() found a repo")
+ return
+ }
+ if findDirty2() {
+ log.Info("findDirty2() found a repo")
+ return
}
- findDirty2()
})
release.openrepo = release.grid.NewButton("open repo", func() {
@@ -128,6 +135,11 @@ func createReleaseWindow() {
}
buttonEnable()
})
+ release.checkSafeB = release.grid.NewButton("checkSafeGoSumRemake()", func() {
+ buttonDisable()
+ release.current.checkSafeGoSumRemake()
+ buttonEnable()
+ })
release.checkGoSumB = release.grid.NewButton("CheckGoSum()", func() {
buttonDisable()
tmp := release.current.String()
@@ -141,6 +153,9 @@ func createReleaseWindow() {
if release.current.getGoSumStatus() == "BAD" {
release.current.setGoSumStatus("BAD VERSION")
}
+ if release.current.getGoSumStatus() == "CLEAN" {
+ release.current.setGoSumStatus("BAD VERSION")
+ }
} else {
log.Info("BAD VERSION repo has go.sum requirements that are screwed up.", tmp)
log.Info("BAD VERSION need to addRepo() the missing repo", missing)
@@ -211,6 +226,7 @@ func buttonDisable() {
release.openrepo.Disable()
release.checkDirtyB.Disable()
release.sendVersionB.Disable()
+ release.checkSafeB.Disable()
}
func buttonEnable() {
@@ -220,6 +236,7 @@ func buttonEnable() {
release.openrepo.Enable()
release.checkDirtyB.Enable()
release.sendVersionB.Enable()
+ release.checkSafeB.Enable()
}
func findDirty2() bool {
@@ -314,7 +331,7 @@ func findNextDirty() bool {
return false
}
-func findNextRepo() {
+func findNextRepo() bool {
for _, repo := range me.allrepos {
goSumS := repo.getGoSumStatus()
dirtyS := repo.dirtyLabel.String()
@@ -335,7 +352,7 @@ func findNextRepo() {
continue
}
if setCurrentRepo(repo, "clean round 2", "check manually") {
- return
+ return true
}
}
if goSumS == "DIRTY" {
@@ -349,14 +366,15 @@ func findNextRepo() {
}
if setCurrentRepo(repo, "dirty", "commit changes") {
- return
+ return true
}
}
if goSumS == "BAD" {
if setCurrentRepo(repo, "bad", "redo go.sum") {
- return
+ return true
}
}
}
log.Info("tried to findNextRepo() but not sure what to do next")
+ return false
}