diff options
| author | Jeff Carr <[email protected]> | 2025-01-28 11:36:06 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-01-28 11:36:06 -0600 |
| commit | 2d118d3ae7399c435f8327c8fcee8240824d8edd (patch) | |
| tree | f7c0dc79c127408e3b9334aa4eae58a6934ac1cd | |
| parent | 0ec680f2c3264d7121bb60a298e2c495a9709d4f (diff) | |
| -rw-r--r-- | doRelease.go | 9 | ||||
| -rw-r--r-- | findNext.go | 11 | ||||
| -rw-r--r-- | globalDisplayOptions.go | 2 | ||||
| -rw-r--r-- | main.go | 14 | ||||
| -rw-r--r-- | prepareRelease.go | 49 |
5 files changed, 19 insertions, 66 deletions
diff --git a/doRelease.go b/doRelease.go index bfcd390..124156a 100644 --- a/doRelease.go +++ b/doRelease.go @@ -198,6 +198,8 @@ func doRelease() bool { // run this each time something gets published successfully rePrepareRelease() + findNext() + // attempt to find another repo to release if !doReleaseFindNext() { log.Info("doReleaseFindNext() could not find a new", findCounter) @@ -233,9 +235,10 @@ func doReleaseFindNext() bool { log.Info("boo, you didn't git clone", me.current.GetGoPath()) return false } - if findFix { - fixGodeps(check) - } + // took this out 2025-01-20. things were working perfectly before this + // if findFix { + // fixGodeps(check) + // } if me.forge.FinalGoDepsCheckOk(check, false) { // the go.sum file is ok to release return true diff --git a/findNext.go b/findNext.go index 17a7fa0..bc2ac7b 100644 --- a/findNext.go +++ b/findNext.go @@ -132,17 +132,6 @@ func findNext() bool { log.Info("findNext() skipping dirty") continue } - /* - if findFix { - log.Info("findFix is true. running fixGoDeps()") - if fixGodeps(check) { - log.Info("fixGoDeps() returned true") - } else { - log.Info("fixGoDeps() returned false") - } - - } - */ findCounter += 1 if !check.ParseGoSum() { log.Info("ParseGoSum() failed") diff --git a/globalDisplayOptions.go b/globalDisplayOptions.go index 19d366c..0446dda 100644 --- a/globalDisplayOptions.go +++ b/globalDisplayOptions.go @@ -28,7 +28,7 @@ func globalDisplayOptions(box *gui.Node) { grid := group1.RawGrid() grid.NewButton("make prepare-release", func() { - makePrepareRelease() + rePrepareRelease() }) grid.NextRow() @@ -119,8 +119,18 @@ func main() { } me.Enable() - // set all branches to master & findNext() - makePrepareRelease() + // run this each time something gets published successfully + rePrepareRelease() + + if findNext() { + log.Info("prepare release findNext() returned true") + } else { + // check if nothing is found an exit? + if me.found.Len() == 0 { + log.Info("nothing found to publish") + os.Exit(0) + } + } // intermittently scans the status indefinitly me.repos.View.Watchdog(func() { diff --git a/prepareRelease.go b/prepareRelease.go index 2a15154..162fd85 100644 --- a/prepareRelease.go +++ b/prepareRelease.go @@ -10,21 +10,6 @@ import ( "go.wit.com/log" ) -func makePrepareRelease() { - me.Disable() - me.release.box.Disable() - defer me.Enable() - - // run this each time something gets published successfully - rePrepareRelease() - - if findNext() { - log.Info("prepare release findNext() returned true") - } - - me.release.box.Enable() -} - func forceReleaseVersion(repo *gitpb.Repo) { if argv.Minor { // if v1.2.3 change to v.1.3.0 @@ -38,40 +23,6 @@ func forceReleaseVersion(repo *gitpb.Repo) { os.Exit(-1) } } - /* - // empty git notes - if _, err := repo.RunVerboseOnError([]string{"go-mod-clean", "--purge"}); err != nil { - // log.Info("probably you don't have gomodclean") - // log.Info(strings.Join(result.Stdout, "\n")) - // log.Info(strings.Join(result.Stderr, "\n")) - // repo.Run([]string{"git", "notes", "remove"}) - os.Exit(-1) - } - - if !runGoClean(repo, "--restore") { - log.Info("gomodclean probably failed here. that's ok", repo.GetGoPath()) - // os.Exit(-1) - } - */ -} -func rillGoModRestore(repo *gitpb.Repo) error { - /* - if repo.GetTargetVersion() == "" { - // not set to upgrade - return nil - } - if repo.GetLastTag() == repo.GetTargetVersion() { - return nil - } - */ - if me.forge.Config.IsReadOnly(repo.GetGoPath()) { - return nil - } - if me.forge.Config.IsPrivate(repo.GetGoPath()) { - return nil - } - runGoClean(repo, "--restore") - return nil } func rePrepareRelease() { |
