moved lots of logic to go-mod-clean
This commit is contained in:
parent
3ceb5d0bf5
commit
021c7774b2
45
findNext.go
45
findNext.go
|
@ -69,48 +69,19 @@ func findNext() bool {
|
|||
log.Info("findNext() alreadyDone. WHY IS THIS STILL CHECKING?", check.GetGoPath())
|
||||
continue
|
||||
}
|
||||
log.Info("CHECKING:", check.GetGoPath())
|
||||
// _, err := check.RunVerboseOnError([]string{"go-mod-clean", "--strict"})
|
||||
_, err := check.RunQuiet([]string{"go-mod-clean", "--smart"})
|
||||
if err != nil {
|
||||
log.Info("FAILED: findNext() go-mod-clean --smart", check.GetGoPath(), err)
|
||||
continue
|
||||
}
|
||||
|
||||
findCounter += 1
|
||||
if !check.ParseGoSum() {
|
||||
log.Info("ParseGoSum() failed", check.GetGoPath())
|
||||
log.Info("ParseGoSum() failed", check.GetGoPath())
|
||||
log.Info("ParseGoSum() failed", check.GetGoPath())
|
||||
continue
|
||||
}
|
||||
log.Info("CHECKING START:", check.GetGoPath())
|
||||
|
||||
/*
|
||||
if err := me.forge.CleanGoDepsCheckOk(check); err != nil {
|
||||
log.Info("CleanGoDepsCheckOk() failed", check.GetGoPath(), err)
|
||||
log.Info("CleanGoDepsCheckOk() failed", check.GetGoPath(), err)
|
||||
findCounter += 1
|
||||
if !check.ParseGoSum() {
|
||||
log.Info("ParseGoSum() failed", check.GetGoPath())
|
||||
log.Info("ParseGoSum() failed", check.GetGoPath())
|
||||
log.Info("ParseGoSum() failed", check.GetGoPath())
|
||||
continue
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
if err := checkDeps(check); err != nil {
|
||||
log.Info("CHECK DEPS FAILED", check.GetGoPath(), err)
|
||||
log.Info("CHECK DEPS FAILED", check.GetGoPath(), err)
|
||||
log.Info("CHECK DEPS FAILED", check.GetGoPath(), err)
|
||||
continue
|
||||
} else {
|
||||
log.Info("Might be ok?", check.GetGoPath())
|
||||
}
|
||||
*/
|
||||
fixGodeps(check)
|
||||
/*
|
||||
} else {
|
||||
log.Info("SKIPPING FIX", check.GetGoPath())
|
||||
log.Info("SKIPPING FIX", check.GetGoPath())
|
||||
log.Info("SKIPPING FIX", check.GetGoPath())
|
||||
}
|
||||
*/
|
||||
// fixGodeps(check)
|
||||
|
||||
if err := me.forge.FinalGoDepsCheckOk(check, argv.Verbose); err != nil {
|
||||
// if err := me.forge.FinalGoDepsCheckOk(check, false); err != nil {
|
||||
|
@ -138,7 +109,7 @@ func findNext() bool {
|
|||
}
|
||||
|
||||
// tries to fix the go.mod and go.sum files
|
||||
func fixGodeps(check *gitpb.Repo) bool {
|
||||
func fixGodepsOLD(check *gitpb.Repo) bool {
|
||||
var good bool = true
|
||||
|
||||
check.GoDeps = nil
|
||||
|
|
2
http.go
2
http.go
|
@ -94,7 +94,7 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
|
|||
return
|
||||
}
|
||||
// destroy and recreate the go.sum
|
||||
fixGodeps(check)
|
||||
fixGodepsOLD(check)
|
||||
findOk = true
|
||||
return
|
||||
case "/showNext":
|
||||
|
|
|
@ -51,10 +51,10 @@ func rillRestore(repo *gitpb.Repo) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
_, err := repo.RunQuiet([]string{"go-mod-clean", "--restore"})
|
||||
_, err := repo.RunQuiet([]string{"go-mod-clean", "--smart"})
|
||||
rillcount += 1
|
||||
if err != nil {
|
||||
log.Info("go-mod-clean --restore failed", repo.GetGoPath(), err)
|
||||
log.Info("go-mod-clean --smart failed", repo.GetGoPath(), err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
@ -65,7 +65,7 @@ func rePrepareRelease() {
|
|||
// me.forge = forgepb.Init()
|
||||
me.found = new(gitpb.Repos)
|
||||
|
||||
log.Printf("rePrepareRelease() START rill go-mod-clean --restore (11 seconds?)")
|
||||
log.Printf("rePrepareRelease() START rill go-mod-clean --smart (11 seconds?)")
|
||||
rillcount = 0
|
||||
now := time.Now()
|
||||
me.forge.RillFuncError(rillRestore)
|
||||
|
|
|
@ -51,7 +51,10 @@ func createReleaseBox(box *gui.Node) {
|
|||
buttonEnable()
|
||||
log.Info("doRelease() worked")
|
||||
} else {
|
||||
log.Info("doRelease() failed", err, me.current.GetGoPath())
|
||||
log.Info("doRelease() failed", err)
|
||||
log.Info("doRelease() FAILED", err)
|
||||
log.Info("doRelease() FAILED", err)
|
||||
log.Info("doRelease() FAILED", err)
|
||||
}
|
||||
})
|
||||
me.release.grid.NewButton("Find Next", func() {
|
||||
|
|
Loading…
Reference in New Issue