summaryrefslogtreecommitdiff
path: root/prepareRelease.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-05-29 19:18:12 -0500
committerJeff Carr <[email protected]>2025-05-29 19:18:12 -0500
commit2f6b497b12ada0b920fb61f80a5756c3aded599a (patch)
tree9936a63d3a97192095fabe5be0b3d771c9231b00 /prepareRelease.go
parentc0b5f7da3ad782d6d30f2c9abcf2ef239b4df58a (diff)
Diffstat (limited to 'prepareRelease.go')
-rw-r--r--prepareRelease.go35
1 files changed, 27 insertions, 8 deletions
diff --git a/prepareRelease.go b/prepareRelease.go
index 704e10d..ff59fbd 100644
--- a/prepareRelease.go
+++ b/prepareRelease.go
@@ -53,10 +53,10 @@ func rillPurge(repo *gitpb.Repo) error {
return nil
}
- _, err := repo.RunQuiet([]string{"go-mod-clean", "--purge"})
+ _, err := repo.RunQuiet([]string{"go-mod-clean", "purge"})
rillcount += 1
if err != nil {
- log.Info("go-mod-clean --smart failed", repo.GetGoPath(), err)
+ log.Info("go-mod-clean purge failed", repo.GetGoPath(), err)
return err
}
return nil
@@ -72,18 +72,18 @@ func rillRestore(repo *gitpb.Repo) error {
var err error
if argv.Verbose {
- log.Info("go-mod-clean --smart START", repo.GetGoPath())
- result := repo.RunRealtime([]string{"go-mod-clean", "--smart"})
- log.Info("go-mod-clean --smart END", repo.GetGoPath())
+ log.Info("go-mod-clean lax START", repo.GetGoPath())
+ result := repo.RunRealtime([]string{"go-mod-clean", "lax"})
+ log.Info("go-mod-clean lax END", repo.GetGoPath())
if result.Exit != 0 {
err = fmt.Errorf("repo %s failed %d", repo.GetGoPath(), result.Exit)
}
} else {
- _, err = repo.RunQuiet([]string{"go-mod-clean", "--smart"})
+ _, err = repo.RunQuiet([]string{"go-mod-clean", "lax"})
}
rillcount += 1
if err != nil {
- log.Info("go-mod-clean --smart failed", repo.GetGoPath(), err)
+ log.Info("go-mod-clean lax failed", repo.GetGoPath(), err)
return err
}
return nil
@@ -93,8 +93,9 @@ func rePrepareRelease() {
// reload the config
// me.forge = forgepb.Init()
me.found = new(gitpb.Repos)
+ me.reason = make(map[*gitpb.Repo]string) // stores the reason repos need to be versioned & released
- log.Printf("rePrepareRelease() START rill go-mod-clean --smart (11 seconds?)")
+ log.Printf("rePrepareRelease() START rill go-mod-clean lax (11 seconds?)")
rillcount = 0
forgepb.RillX = 2
forgepb.RillY = 2
@@ -176,6 +177,7 @@ func rePrepareRelease() {
log.Printf("NEED RELEASE FOR %-50s tag %s != %s\n", check.GetGoPath(), master, lastTag)
forceReleaseVersion(check)
me.found.AppendByGoPath(check)
+ me.reason[check] = "master != lastTag"
continue
}
@@ -197,6 +199,7 @@ func rePrepareRelease() {
// if --protobuf, this will force upgrade each one
forceReleaseVersion(check)
me.found.AppendByGoPath(check)
+ me.reason[check] = "protobuf repo deps changed"
continue
}
@@ -211,6 +214,7 @@ func rePrepareRelease() {
log.Printf("NEED RELEASE FOR %-50s err: %v\n", check.GetGoPath(), err)
forceReleaseVersion(check)
me.found.AppendByGoPath(check)
+ me.reason[check] = "FinalGoDepsCheckOk() failed even though master tag == last tag"
}
}
@@ -238,6 +242,21 @@ func alreadyDone(repo *gitpb.Repo) bool {
return false
}
+/*
+func upgradeReason(repo *gitpb.Repo) string {
+ for _, gopath := range me.reason {
+ // log.Info("WARNING already done", gopath, repo.GetGoPath())
+ // log.Info("WARNING already done", gopath, repo.GetGoPath())
+ // log.Info("WARNING already done", gopath, repo.GetGoPath())
+ if repo.GetGoPath() == gopath {
+ log.Info("FOUND. RETURN TRUE. already done", gopath, repo.GetGoPath())
+ return true
+ }
+ }
+ return false
+}
+*/
+
func checkPublishedGodeps(repo *gitpb.Repo) error {
godepsOld, err := repo.GoSumFromPkgDir()
if err != nil {