summaryrefslogtreecommitdiff
path: root/cleanGoSum.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-08 04:07:53 -0600
committerJeff Carr <[email protected]>2025-01-08 04:07:53 -0600
commit3adf184a4ad6f9012c8055b1af453394844898cd (patch)
tree3cd3db47e3c68aa0d19f8b2109b0c5671dde45b7 /cleanGoSum.go
parenta6b802d0f411af79cf51563fb6ade363dae6bca7 (diff)
validate versions before running go getv0.0.32v0.0.31v0.0.30v0.0.29v0.0.28
Diffstat (limited to 'cleanGoSum.go')
-rw-r--r--cleanGoSum.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/cleanGoSum.go b/cleanGoSum.go
index ec4c981..85abac7 100644
--- a/cleanGoSum.go
+++ b/cleanGoSum.go
@@ -8,6 +8,7 @@ import (
"sort"
"strings"
+ "go.wit.com/lib/protobuf/forgepb"
"go.wit.com/lib/protobuf/gitpb"
"go.wit.com/log"
)
@@ -64,8 +65,11 @@ func cleanGoDepsCheckOk(check *gitpb.Repo) error {
depRepo.GetVersion(), found.GetMasterVersion(), ends)
errs := fmt.Sprintf("%s error %s vs %s %s", depRepo.GetGoPath(),
depRepo.GetVersion(), found.GetMasterVersion(), ends)
- cmd := []string{"go", "get", depRepo.GetGoPath() + "@" + found.GetMasterVersion()}
- fixes = append(fixes, cmd)
+ if ok, _ := forgepb.ValidGoVersion(found.GetMasterVersion()); ok {
+ // can't go get invalid version numbers
+ cmd := []string{"go", "get", depRepo.GetGoPath() + "@" + found.GetMasterVersion()}
+ fixes = append(fixes, cmd)
+ }
err = errors.New(errs)
}
}