summaryrefslogtreecommitdiff
path: root/scan.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-24 02:41:34 -0600
committerJeff Carr <[email protected]>2024-01-24 02:41:34 -0600
commitf2ad6d3138ce39e6fdd0508eeddd2439ad275f3c (patch)
treeff308f9c005fa778f4707184dc2bb2ef73afb94d /scan.go
parent9ddf46cf75a15a7b6398cc6d25b20bb993429cda (diff)
more attempts at release automation
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'scan.go')
-rw-r--r--scan.go49
1 files changed, 49 insertions, 0 deletions
diff --git a/scan.go b/scan.go
index de5e07f..8492900 100644
--- a/scan.go
+++ b/scan.go
@@ -73,3 +73,52 @@ func (r *repo) getStatus() string {
log.Warn("Branches are not Perfect")
return "merge"
}
+
+func scanGoSum() {
+ for repo, _ := range me.allrepos {
+ latestversion := repo.status.GetLastTagVersion()
+ if repo.goSumStatus.String() == "BAD" {
+ continue
+ }
+ if repo.goSumStatus.String() == "DIRTY" {
+ continue
+ }
+ if repo.status.CheckDirty() {
+ log.Info("dirty repo:", latestversion, repo.status.String())
+ log.Info("dirty repo.goSumStatus =", repo.goSumStatus.String())
+ repo.goSumStatus.SetLabel("DIRTY")
+
+ // release.repo.SetValue(repo.status.String())
+ // release.status.SetValue("dirty")
+ // release.notes.SetValue("You must commit your changes\nbefore you can continue")
+ // release.current = repo
+ // release.openrepo.Enable()
+ continue
+ }
+ if repo.status.CheckGoSum() {
+ log.Info("repo has go.sum requirements that are clean")
+ repo.goSumStatus.SetLabel("CLEAN")
+ } else {
+ log.Info("repo has go.sum requirements that are screwed up")
+ repo.goSumStatus.SetLabel("BAD")
+
+ // release.repo.SetValue(repo.status.String())
+ // release.status.SetValue("bad")
+ // release.notes.SetValue("the go.sum file is wrong")
+ // release.current = repo
+ // release.openrepo.Enable()
+ continue
+ }
+ status := repo.dirtyLabel.String()
+ if status == "PERFECT" {
+ continue
+ } else {
+ repo.status.Update()
+ repo.newScan()
+ }
+
+ // log.Info("find the next repo to release here")
+ log.Info("repo:", latestversion, status, repo.status.String())
+ }
+ log.Info("scan() did everything, not sure what to do next")
+}