summaryrefslogtreecommitdiff
path: root/validate/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-12-01 16:04:07 -0600
committerJeff Carr <[email protected]>2024-12-01 16:04:07 -0600
commit412658698a6d1ad09d64723e9a10e676c77afa94 (patch)
treed9b3622eee7414982589dc0496c76854fd1b7600 /validate/main.go
parent82935ae6b2d413322b18a9b487973e5ab04e6efd (diff)
Repotype() working somewhatv0.0.15
Diffstat (limited to 'validate/main.go')
-rw-r--r--validate/main.go29
1 files changed, 19 insertions, 10 deletions
diff --git a/validate/main.go b/validate/main.go
index 57329ef..7c32ac6 100644
--- a/validate/main.go
+++ b/validate/main.go
@@ -35,6 +35,9 @@ func main() {
repos := forge.Repos.SortByGoPath()
for repos.Scan() {
repo := repos.Next()
+ if ! repo.IsValid() {
+ continue
+ }
// forge.VerifyBranchNames(repo)
fullpath := repo.GetFullPath()
mName := repo.GetMasterBranchName()
@@ -44,16 +47,16 @@ func main() {
plen := repo.PublishedLen()
var ds, ps string
if dlen == 0 {
- ds = ""
+ ds = " "
} else {
ds = fmt.Sprintf("%2d", dlen)
}
if plen == 0 {
- ps = ""
+ ps = " "
} else {
ps = fmt.Sprintf("%2d", plen)
}
- log.Printf("repo: %-60s %-10s %-8s %-8s %s %s\n", fullpath, mName, dName, uName, ds, ps)
+ log.Printf("repo: %-60s %-10s %-8s %-8s %s %s %s\n", fullpath, mName, dName, uName, ds, ps, repo.RepoType())
/*
if repo.GoDepsChanged() {
log.Printf("\tdependancy checks indicate a new release is needed for %s\n", repo.GetGoPath())
@@ -63,21 +66,27 @@ func main() {
*/
}
- goclone := forge.Repos.FindByGoPath("go.wit.com/apps/go-clone")
- if goclone == nil {
- log.Info("boo, you didn't git go-clone?")
+ if argv.Repo == "" {
+ log.Info("no --repo")
+ os.Exit(-1)
+ }
+
+ check := forge.Repos.FindByGoPath(argv.Repo)
+ if check == nil {
+ log.Info("boo, you didn't git check", argv.Repo)
os.Exit(-1)
}
+ check.RedoGoMod()
- match, err := forge.Repos.GoDepsChanged(goclone)
+ match, err := forge.Repos.GoDepsChanged(check)
if err != nil {
- log.Info("dependancy checks failed", goclone.GetGoPath(), err)
+ log.Info("dependancy checks failed", check.GetGoPath(), err)
os.Exit(-1)
}
if match {
- log.Printf("dependancy checks indicate a new release is needed for %s\n", goclone.GetGoPath())
+ log.Printf("dependancy checks indicate a new release is needed for %s\n", check.GetGoPath())
} else {
- log.Printf("dependancies have not changed for %s\n", goclone.GetGoPath())
+ log.Printf("dependancies have not changed for %s\n", check.GetGoPath())
}
if argv.SaveConfig {