fix more of the logic errors
This commit is contained in:
parent
2d118d3ae7
commit
1d6c67b46c
33
findNext.go
33
findNext.go
|
@ -113,33 +113,36 @@ func findNext() bool {
|
||||||
all := me.found.SortByFullPath()
|
all := me.found.SortByFullPath()
|
||||||
for all.Scan() {
|
for all.Scan() {
|
||||||
check := all.Next()
|
check := all.Next()
|
||||||
|
if check.GetMasterBranchName() != check.GetCurrentBranchName() {
|
||||||
|
log.Info("YOU MUST BE ON THE MASTER BRANCH", check.GetGoPath())
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if check.IsDirty() {
|
||||||
|
log.Info("CAN NOT RELEASE DIRTY REPO", check.GetGoPath())
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
log.Info("CHECKING:", check.GetGoPath())
|
||||||
|
_, err := check.RunVerboseOnError([]string{"go-mod-clean", "--strict"})
|
||||||
|
if err != nil {
|
||||||
|
log.Info("FAILED:", check.GetGoPath())
|
||||||
|
continue
|
||||||
|
}
|
||||||
if err := checkDeps(check); err != nil {
|
if err := checkDeps(check); err != nil {
|
||||||
log.Info("\t", check.GetGoPath(), err)
|
log.Info("\t", check.GetGoPath(), err)
|
||||||
continue
|
continue
|
||||||
} else {
|
} else {
|
||||||
log.Info("Might be ok?", check.GetGoPath())
|
log.Info("Might be ok?", check.GetGoPath())
|
||||||
}
|
}
|
||||||
if check.GetMasterBranchName() != check.GetCurrentBranchName() {
|
|
||||||
log.Info("YOU MUST BE ON THE MASTER BRANCHES")
|
|
||||||
os.Exit(-1)
|
|
||||||
}
|
|
||||||
_, err := check.RunVerboseOnError([]string{"go-mod-clean", "--strict"})
|
|
||||||
if err != nil {
|
|
||||||
os.Exit(-1)
|
|
||||||
}
|
|
||||||
|
|
||||||
if check.IsDirty() {
|
|
||||||
log.Info("findNext() skipping dirty")
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
findCounter += 1
|
findCounter += 1
|
||||||
if !check.ParseGoSum() {
|
if !check.ParseGoSum() {
|
||||||
log.Info("ParseGoSum() failed")
|
log.Info("ParseGoSum() failed", check.GetGoPath())
|
||||||
log.Info("ParseGoSum() failed")
|
log.Info("ParseGoSum() failed", check.GetGoPath())
|
||||||
log.Info("ParseGoSum() failed")
|
log.Info("ParseGoSum() failed", check.GetGoPath())
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if me.forge.FinalGoDepsCheckOk(check, false) {
|
if me.forge.FinalGoDepsCheckOk(check, false) {
|
||||||
|
log.Info("GOOD TO GO ON", check.GetGoPath())
|
||||||
setCurrentRepo(check, "should be good to release", "pretty sure")
|
setCurrentRepo(check, "should be good to release", "pretty sure")
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
|
|
11
main.go
11
main.go
|
@ -93,14 +93,6 @@ func main() {
|
||||||
// create the right side of the main window
|
// create the right side of the main window
|
||||||
createReleaseBox(me.mainBox)
|
createReleaseBox(me.mainBox)
|
||||||
|
|
||||||
// disable the open repo button. this isn't really important
|
|
||||||
// but does indicates the app (and toolkit) is working
|
|
||||||
// this can be removed later, but in these early days, I'm using this
|
|
||||||
// tool to release the code for this app, the gui and the gui toolkits
|
|
||||||
// and sometimes they lie, don't display stuff, don't even disable things
|
|
||||||
// so I can't trust even what I see. It's complicated right now still.
|
|
||||||
me.release.openrepo.Disable()
|
|
||||||
|
|
||||||
// disable the gui until the repos are scanned
|
// disable the gui until the repos are scanned
|
||||||
me.release.box.Disable()
|
me.release.box.Disable()
|
||||||
me.Disable()
|
me.Disable()
|
||||||
|
@ -117,7 +109,6 @@ func main() {
|
||||||
msg := fmt.Sprint("Can not run if pwd is not a repo", pwd)
|
msg := fmt.Sprint("Can not run if pwd is not a repo", pwd)
|
||||||
badExit(errors.New(msg))
|
badExit(errors.New(msg))
|
||||||
}
|
}
|
||||||
me.Enable()
|
|
||||||
|
|
||||||
// run this each time something gets published successfully
|
// run this each time something gets published successfully
|
||||||
rePrepareRelease()
|
rePrepareRelease()
|
||||||
|
@ -131,6 +122,8 @@ func main() {
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
me.Enable()
|
||||||
|
me.release.box.Enable()
|
||||||
|
|
||||||
// intermittently scans the status indefinitly
|
// intermittently scans the status indefinitly
|
||||||
me.repos.View.Watchdog(func() {
|
me.repos.View.Watchdog(func() {
|
||||||
|
|
Loading…
Reference in New Issue