From 96b72979a116cb14974645514920e43eeebd4e0e Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 3 Dec 2024 03:18:27 -0600 Subject: almost, maybe, fully automated. maybe. finally. --- http.go | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'http.go') diff --git a/http.go b/http.go index f04ebe5..99b2863 100644 --- a/http.go +++ b/http.go @@ -4,6 +4,7 @@ import ( "fmt" "net/http" "os" + "path/filepath" "strings" "go.wit.com/lib/gui/repolist" @@ -159,8 +160,13 @@ func okHandler(w http.ResponseWriter, r *http.Request) { testNext() return case "/fixNext": + check := me.forge.Repos.FindByGoPath(me.current.GoPath()) + if check == nil { + log.Info("boo, you didn't git clone", me.current.GoPath()) + return + } // destroy and recreate the go.sum - fixGodeps(me.current) + fixGodeps(check) return case "/showNext": showNext() @@ -230,11 +236,16 @@ func testNext() { log.Info("boo, you didn't git clone", me.current.GoPath()) return } + + data, _ := os.ReadFile(filepath.Join(check.FullPath, "go.mod")) + log.Info(string(data)) + if me.forge.FinalGoDepsCheckOk(check) { - log.Info("finalGoDepsCheck(check) worked!") + log.Info("forge.FinalGoDepsCheck(check) worked!") } else { - log.Info("finalGoDepsCheck(check) failed. boo.") + log.Info("forge.FinalGoDepsCheck(check) failed. boo.") } + } func showNext() { @@ -290,11 +301,11 @@ func showNext() { } log.Info("") + testNext() + log.Info(repolist.ReportHeader()) log.Info(me.current.StandardHeader()) log.Info("") log.Info(repolist.ReleaseReportHeader()) log.Info(me.current.StandardReleaseHeader()) - - testNext() } -- cgit v1.2.3