From 100fed12c48d8397f56327b3f66dcabef3faecd5 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 5 Jan 2025 20:15:18 -0600 Subject: [PATCH] fix build --- Makefile | 6 ----- http.go | 5 ----- repoview.go | 25 +++++++++++---------- simpleRelease.go | 58 ------------------------------------------------ 4 files changed, 13 insertions(+), 81 deletions(-) delete mode 100644 simpleRelease.go diff --git a/Makefile b/Makefile index b5d8e68..be5d2d3 100644 --- a/Makefile +++ b/Makefile @@ -82,12 +82,6 @@ curl-gitpull-helloworld: curl-gitpull-basicworld: curl --silent http://localhost:9419/gitpull?repo=go.wit.com/apps/basicworld -curl-release-helloworld: - curl --silent http://localhost:9419/release?repo=go.wit.com/apps/helloworld - -curl-release-gowit: - curl --silent http://localhost:9419/release?repo=go.wit.com/lib/gui/gowit - file-for-go.wit.com: curl --silent http://localhost:9419/goweblist?readonly=true curl --silent http://localhost:9419/goweblist?readonly=true |sort > ~/go.wit.com.versions diff --git a/http.go b/http.go index 9a74060..fdb9442 100644 --- a/http.go +++ b/http.go @@ -47,11 +47,6 @@ func okHandler(w http.ResponseWriter, r *http.Request) { return } - if route == "/release" { - simpleRelease(w, r) - return - } - if route == "/list" { readonly := r.URL.Query().Get("readonly") onlydirty := r.URL.Query().Get("onlydirty") diff --git a/repoview.go b/repoview.go index 20429af..d1f9dde 100644 --- a/repoview.go +++ b/repoview.go @@ -1,11 +1,8 @@ package main import ( - "os" - "go.wit.com/lib/gadgets" "go.wit.com/lib/gui/repolist" - "go.wit.com/lib/gui/shell" "go.wit.com/log" "go.wit.com/gui" @@ -102,15 +99,17 @@ func (r *repoWindow) repoMenu() *gui.Node { }) */ - box2.NewButton("merge it all", func() { - r.Disable() - if !r.mergeAllUserToDevel() { - return - } - if !r.mergeAllDevelToMain() { - return - } - r.Enable() + box2.NewButton("merge it all (old)", func() { + /* + r.Disable() + if !r.mergeAllUserToDevel() { + return + } + if !r.mergeAllDevelToMain() { + return + } + r.Enable() + */ }) box2.NewButton("show apps", func() { @@ -158,6 +157,7 @@ func (r *repoWindow) repoMenu() *gui.Node { return box2 } +/* func (r *repoWindow) mergeAllDevelToMain() bool { log.Info("merge all here") loop := me.repos.View.ReposSortByName() @@ -226,3 +226,4 @@ func (r *repoWindow) mergeAllUserToDevel() bool { log.Warn("EVERYTHING WORKED") return true } +*/ diff --git a/simpleRelease.go b/simpleRelease.go deleted file mode 100644 index 75f5f45..0000000 --- a/simpleRelease.go +++ /dev/null @@ -1,58 +0,0 @@ -package main - -import ( - "fmt" - "net/http" - "strings" - - "go.wit.com/log" -) - -// attempts a simple release -// merge user branch -> devel; then; -// git push -// merge devel branch -> master; then; -// git push - -// increments the minor version by 1; then; -// git push --tags - -func simpleRelease(w http.ResponseWriter, r *http.Request) { - repoName := r.URL.Query().Get("repo") - if repoName == "" { - log.Info("url did not have repo variable") - return - } - // git pull (or go-clone of it doesn't exist) - repo := me.repos.View.FindByName(repoName) - if repo == nil { - log.Info("repo unknown: " + repoName) - return - } - header := repo.StandardHeader() - if repo.CheckDirty() { - log.Info(header + "skip dirty repo") - return - } - if repo.State() == "PERFECT" { - log.Info(header + "already released") - return - } - - curName := repo.Status.GetCurrentBranchName() - mName := repo.Status.GetMasterBranchName() - if curName != mName { - // s := log.Sprintf("\trepo is not working from main branch", curName, "!=", mName) - s := fmt.Sprint("repo is not working from main branch ", curName, " != ", mName) - log.Info(s) - return - } - cmd := []string{"git", "pull", "-v"} - log.Info(header + strings.Join(cmd, " ")) - if repo.Status.MergeUserToDevel() { - log.Info("THINGS SEEM OK MergeUserToDevel() returned true.") - } else { - log.Info("THINGS FAILED MergeUserToDevel() returned false") - } - return -}