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 /doSingleRepo.go | |
| parent | d0e1372a6e70493debbf6b0595ac3b2cec3c0a2e (diff) | |
compliles and does stuff
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'doSingleRepo.go')
| -rw-r--r-- | doSingleRepo.go | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/doSingleRepo.go b/doSingleRepo.go new file mode 100644 index 0000000..9262a07 --- /dev/null +++ b/doSingleRepo.go @@ -0,0 +1,73 @@ +package main + +import ( + "os" + + "go.wit.com/lib/gui/repolist" + "go.wit.com/log" +) + +func doSingleRepo(myRepoName string) { + // the repo from the command line + 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 + // for _, repo := range me.repos.View.AllRepos() { + myrepo = me.repos.View.FindRepoByName(myRepoName) + + me.mainWindow.Disable() + defer me.mainWindow.Enable() + if myrepo == nil { + log.Info("could not find", myargs.Repo) + + } + 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 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 { + log.Info("--dry-run == true") + // doRelease() + } +} |
