diff options
| author | Jeff Carr <[email protected]> | 2024-11-04 08:16:42 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-11-04 08:16:42 -0600 |
| commit | 9f7d0343397b0245fa0ba01cf488fa4bcca3bb5c (patch) | |
| tree | da6969039b184b246ceb0da5b19804d097e4d4cb /main.go | |
| parent | d0e1372a6e70493debbf6b0595ac3b2cec3c0a2e (diff) | |
compliles and does stuff
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 116 |
1 files changed, 61 insertions, 55 deletions
@@ -7,13 +7,12 @@ import ( "go.wit.com/dev/alexflint/arg" "go.wit.com/gui" "go.wit.com/lib/gui/gowit" - "go.wit.com/lib/gui/repolist" "go.wit.com/lib/gui/shell" "go.wit.com/log" ) var VERSION string -var myargs args +var myargs argv func main() { me = new(autoType) @@ -41,6 +40,9 @@ func main() { me.mainWindow = me.myGui.NewWindow("GUI release manager " + VERSION) me.mainBox = me.mainWindow.NewBox("bw hbox", true) + // start the http server for polling status + go startHTTP() + // sanity check of things that might be around that mess // up things later // if you have a go.work file, you must delete it @@ -99,7 +101,7 @@ func main() { me.repos.View.ScanRepositories() // the repo from the command line - var myrepo *repolist.RepoRow + // var myrepo *repolist.RepoRow // find myself. the guireleaser directory is used as a working scratchpad // for running go commands that can mess up the go.* files @@ -109,66 +111,70 @@ func main() { me.release.guireleaser = repo } } - if repo.GoPath() == myargs.Repo { - myrepo = repo - } + /* + if repo.GoPath() == myargs.Repo { + myrepo = repo + } + */ } - if myargs.Repo != "" { - me.mainWindow.Hide() - if myrepo == nil { - log.Info("could not find", myargs.Repo) - os.Exit(0) - } - log.Info("only going to do repo:", myrepo.GoPath()) - tmp := myargs.Reason - if tmp == "" { - tmp = os.Getenv("GUIRELEASE_REASON") - } - if tmp == "" { - tmp = "made by guireleaser" - } - - // increment all the versions - for _, repo := range me.repos.View.AllRepos() { - if whitelist(repo.GoPath()) { - continue + /* + if myargs.Repo != "" { + me.mainWindow.Hide() + if myrepo == nil { + log.Info("could not find", myargs.Repo) + os.Exit(0) } - if repo.ReadOnly() { - continue + log.Info("only going to do repo:", myrepo.GoPath()) + tmp := myargs.Reason + if tmp == "" { + tmp = os.Getenv("GUIRELEASE_REASON") } - lasttag := repo.Status.LastTag() - if repo.Status.GetCurrentVersion() == lasttag { - log.Info("skipping unchanged repo", repo.Status.GoPath()) - repo.Status.SetTargetVersion(lasttag) - continue + if tmp == "" { + tmp = "made by guireleaser" } - repo.Status.IncrementRevisionVersion("go-clone") - } - // rescan all the repos - me.repos.View.ScanRepositories() - myrepo.Status.MakeRedomod() - myrepo.Status.IncrementRevisionVersion(tmp) - _, err := me.repos.View.CheckValidGoSum(myrepo) - if err != nil { - log.Info("go mod tidy not ok", err) - return - } - if !checkValidGoSum(myrepo) { - log.Info("go.sum checks failed") + // increment all the versions + for _, repo := range me.repos.View.AllRepos() { + if whitelist(repo.GoPath()) { + continue + } + if repo.ReadOnly() { + continue + } + lasttag := repo.Status.LastTag() + if repo.Status.GetCurrentVersion() == lasttag { + log.Info("skipping unchanged repo", repo.Status.GoPath()) + repo.Status.SetTargetVersion(lasttag) + continue + } + repo.Status.IncrementRevisionVersion("go-clone") + } + // rescan all the repos + me.repos.View.ScanRepositories() + + myrepo.Status.MakeRedomod() + myrepo.Status.IncrementRevisionVersion(tmp) + _, err := me.repos.View.CheckValidGoSum(myrepo) + if err != nil { + log.Info("go mod tidy not ok", err) + return + } + if !checkValidGoSum(myrepo) { + log.Info("go.sum checks failed") + os.Exit(0) + } + setCurrentRepo(myrepo, "should be good to release", "pretty sure") + log.Info("DO THE RELEASE HERE") + log.Info("going to release", myrepo.GoPath(), "as version", myrepo.Status.GetTargetVersion()) + if myargs.DryRun { + log.Info("--dry-run == true") + } else { + doRelease() + } os.Exit(0) } - setCurrentRepo(myrepo, "should be good to release", "pretty sure") - log.Info("DO THE RELEASE HERE") - log.Info("going to release", myrepo.GoPath(), "as version", myrepo.Status.GetTargetVersion()) - if myargs.DryRun { - log.Info("--dry-run == true") - } else { - doRelease() - } - os.Exit(0) - } + */ if me.release.guireleaser == nil { log.Info("Can not release if guireleaser was not found") |
