diff options
| author | Jeff Carr <[email protected]> | 2025-01-29 19:59:55 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-01-29 19:59:55 -0600 |
| commit | d493a55cfa5ac1d50c845643b46ee4c12a192dab (patch) | |
| tree | 785ba73aad155b15bbaad9a1466825152ef4e6bb /doClean.go | |
| parent | bab84d7c903dd53de1cb70cc45a23a5673fa51af (diff) | |
debugging releaser
Diffstat (limited to 'doClean.go')
| -rw-r--r-- | doClean.go | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -14,6 +14,13 @@ var ErrorMergeBranch error = fmt.Errorf("trunk has things not in the branch") var ErrorMergeTrunk error = fmt.Errorf("branch has things not in trunk") func doClean() error { + if argv.Clean.Pub != nil { + if err := doCleanPub(); err != nil { + badExit(err) + } + log.Info("finished attempt at cleaning devel branches") + return nil + } if argv.Clean.Devel != nil { if err := doCleanDevel(); err != nil { badExit(err) @@ -535,3 +542,18 @@ func countGitDiffLog(repo *gitpb.Repo, branch1, branch2 string) int { // log.Info("countDiffObjects()", cmd, len(r.Stdout), strings.Join(r.Stdout, " ")) return len(r.Stdout) } + +func doCleanPub() error { + total := 0 + all := me.forge.Repos.SortByFullPath() + for all.Scan() { + repo := all.Next() + if repo.GetTargetVersion() != "" { + repo.SetTargetVersion("") + configSave = true + total += 1 + } + } + log.Printf("clearing %d total repos\n", total) + return nil +} |
