almost clickable releases
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
504cd29dcb
commit
c83524739c
105
releaseWindow.go
105
releaseWindow.go
|
@ -104,6 +104,8 @@ func createReleaseBox(box *gui.Node) {
|
||||||
switch release.status.String() {
|
switch release.status.String() {
|
||||||
case "PRIMATIVE":
|
case "PRIMATIVE":
|
||||||
log.Warn("can do PRIMATIVE", release.version.String())
|
log.Warn("can do PRIMATIVE", release.version.String())
|
||||||
|
case "GOOD":
|
||||||
|
log.Warn("GOOD. lots of go.sum checks passed", release.version.String())
|
||||||
case "manually chosen":
|
case "manually chosen":
|
||||||
log.Warn("attempting manual release", release.version.String())
|
log.Warn("attempting manual release", release.version.String())
|
||||||
case "NOT READY":
|
case "NOT READY":
|
||||||
|
@ -119,6 +121,10 @@ func createReleaseBox(box *gui.Node) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if release.current.status.ReadOnly() {
|
||||||
|
log.Info("sorry, it's read-only")
|
||||||
|
return
|
||||||
|
}
|
||||||
if release.current.status.CheckDirty() {
|
if release.current.status.CheckDirty() {
|
||||||
log.Info("sorry, it's still dirty")
|
log.Info("sorry, it's still dirty")
|
||||||
return
|
return
|
||||||
|
@ -268,48 +274,19 @@ func createReleaseBox(box *gui.Node) {
|
||||||
}
|
}
|
||||||
buttonEnable()
|
buttonEnable()
|
||||||
})
|
})
|
||||||
|
|
||||||
release.checkGoSumB = release.grid.NewButton("CheckGoSum()", func() {
|
release.checkGoSumB = release.grid.NewButton("CheckGoSum()", func() {
|
||||||
buttonDisable()
|
buttonDisable()
|
||||||
tmp := release.current.String()
|
|
||||||
log.Info("Run CheckGoSum on repo:", tmp)
|
|
||||||
if ok, _ := release.current.status.CheckGoSum(); ok {
|
if ok, _ := release.current.status.CheckGoSum(); ok {
|
||||||
log.Info("repo has go.sum requirements that are clean")
|
log.Info("repo has go.sum requirements that are clean")
|
||||||
release.current.setGoSumStatus("CLEAN")
|
// release.current.setGoSumStatus("CLEAN")
|
||||||
} else {
|
release.status.SetValue("GOOD")
|
||||||
|
release.notes.SetValue("CheckGoSum() does not seem to lie")
|
||||||
}
|
}
|
||||||
|
// goodCheckGoSum()
|
||||||
buttonEnable()
|
buttonEnable()
|
||||||
})
|
})
|
||||||
/*
|
|
||||||
if missing == "" {
|
|
||||||
log.Info("BAD VERSION repo has go.sum requirements that are screwed up.", tmp)
|
|
||||||
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)
|
|
||||||
if repostatus.VerifyLocalGoRepo(missing) {
|
|
||||||
log.Info("BAD VERSION local directory exists", missing)
|
|
||||||
addRepo(reposgrid, missing, "master", "master", "master")
|
|
||||||
} else {
|
|
||||||
log.Info("BAD VERSION local directory does not exist", missing)
|
|
||||||
log.Info("START download of:", missing)
|
|
||||||
os.Setenv("GO111MODULE", "off")
|
|
||||||
err, output := release.current.status.RunCmd([]string{"go", "get", "-v", "-u", missing})
|
|
||||||
log.Warn(output)
|
|
||||||
log.Info("END download of:", missing)
|
|
||||||
if err == nil {
|
|
||||||
log.Warn("go get worked. recheck go.sum")
|
|
||||||
} else {
|
|
||||||
log.Warn("go get failed")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// addRepo(reposgrid, missing, "master", "master", "master")
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
release.grid.NewButton("CheckPrimativeGoMod()", func() {
|
release.grid.NewButton("CheckPrimativeGoMod()", func() {
|
||||||
tmp := release.current.String()
|
tmp := release.current.String()
|
||||||
log.Info("Run CheckGoSum on repo:", tmp)
|
log.Info("Run CheckGoSum on repo:", tmp)
|
||||||
|
@ -320,6 +297,7 @@ func createReleaseBox(box *gui.Node) {
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
release.grid.NewButton("reset with scanGoSum()", func() {
|
release.grid.NewButton("reset with scanGoSum()", func() {
|
||||||
buttonDisable()
|
buttonDisable()
|
||||||
// do an initial scan of all the repos
|
// do an initial scan of all the repos
|
||||||
|
@ -348,6 +326,41 @@ func createReleaseBox(box *gui.Node) {
|
||||||
buttonEnable()
|
buttonEnable()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
func goodCheckGoSum() bool {
|
||||||
|
tmp := release.current.String()
|
||||||
|
log.Info("Run CheckGoSum on repo:", tmp)
|
||||||
|
/*
|
||||||
|
*/
|
||||||
|
|
||||||
|
var maybe bool = true
|
||||||
|
goConfig := release.current.status.GetGoDeps()
|
||||||
|
for depname, version := range goConfig {
|
||||||
|
log.Info("Checking repo deps:", depname, version)
|
||||||
|
repo, ok := me.allrepos[depname]
|
||||||
|
if ok {
|
||||||
|
goSumS := repo.getGoSumStatus()
|
||||||
|
if goSumS == "WHITELIST" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
lastS := repo.status.GetLastTagVersion()
|
||||||
|
targetS := repo.targetVersion.String()
|
||||||
|
log.Info(" repo deps:", depname, version, "vs", goSumS, lastS, targetS)
|
||||||
|
if lastS != targetS {
|
||||||
|
maybe = false
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
log.Info(" repo deps: IGNORE", depname, version)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if maybe {
|
||||||
|
log.Info("SUCCEEDED.", release.current.String())
|
||||||
|
log.Info("SUCCEEDED. MAYBE. try it again get go.sum requirements")
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
log.Info("FAILED. move on")
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
func buttonDisable() {
|
func buttonDisable() {
|
||||||
me.Disable()
|
me.Disable()
|
||||||
|
@ -448,6 +461,28 @@ func findNextDirty(onlyKind string) bool {
|
||||||
if goSumS == "IGNORE" {
|
if goSumS == "IGNORE" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if goSumS == "RELEASED" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if goSumS == "WHITELIST" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
setCurrentRepo(repo, "REDO GOSUM", "try redoing the gosum")
|
||||||
|
if goodCheckGoSum() {
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
// continue
|
||||||
|
}
|
||||||
|
if repo.String() == "go.wit.com/log" {
|
||||||
|
log.Info("findNextDirty() FOUND LOG", repo.String(), goSumS, dirtyS)
|
||||||
|
log.Info("findNextDirty() FOUND LOG", repo.String(), goSumS, dirtyS)
|
||||||
|
log.Info("findNextDirty() FOUND LOG", repo.String(), goSumS, dirtyS)
|
||||||
|
log.Info("findNextDirty() FOUND LOG", repo.String(), goSumS, dirtyS)
|
||||||
|
log.Info("findNextDirty() FOUND LOG", repo.String(), goSumS, dirtyS)
|
||||||
|
log.Sleep(10)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
continue
|
||||||
if goSumS == "UNRELEASED" {
|
if goSumS == "UNRELEASED" {
|
||||||
if setCurrentRepo(repo, "UNRELEASED", "manually check go.sum") {
|
if setCurrentRepo(repo, "UNRELEASED", "manually check go.sum") {
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in New Issue