summaryrefslogtreecommitdiff
path: root/validate/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'validate/main.go')
-rw-r--r--validate/main.go42
1 files changed, 40 insertions, 2 deletions
diff --git a/validate/main.go b/validate/main.go
index da709e0..57329ef 100644
--- a/validate/main.go
+++ b/validate/main.go
@@ -1,6 +1,7 @@
package main
import (
+ "fmt"
"os"
"go.wit.com/dev/alexflint/arg"
@@ -34,12 +35,49 @@ func main() {
repos := forge.Repos.SortByGoPath()
for repos.Scan() {
repo := repos.Next()
- forge.VerifyBranchNames(repo)
+ // forge.VerifyBranchNames(repo)
fullpath := repo.GetFullPath()
mName := repo.GetMasterBranchName()
dName := repo.GetDevelBranchName()
uName := repo.GetUserBranchName()
- log.Printf("repo: %-60s %-8s %-8s %-8s\n", fullpath, mName, dName, uName)
+ dlen := repo.GoDepsLen()
+ plen := repo.PublishedLen()
+ var ds, ps string
+ if dlen == 0 {
+ ds = ""
+ } else {
+ ds = fmt.Sprintf("%2d", dlen)
+ }
+ if plen == 0 {
+ ps = ""
+ } else {
+ ps = fmt.Sprintf("%2d", plen)
+ }
+ log.Printf("repo: %-60s %-10s %-8s %-8s %s %s\n", fullpath, mName, dName, uName, ds, ps)
+ /*
+ if repo.GoDepsChanged() {
+ log.Printf("\tdependancy checks indicate a new release is needed for %s\n", repo.GetGoPath())
+ } else {
+ log.Printf("\tdependancies have not changed for %s\n", repo.GetGoPath())
+ }
+ */
+ }
+
+ goclone := forge.Repos.FindByGoPath("go.wit.com/apps/go-clone")
+ if goclone == nil {
+ log.Info("boo, you didn't git go-clone?")
+ os.Exit(-1)
+ }
+
+ match, err := forge.Repos.GoDepsChanged(goclone)
+ if err != nil {
+ log.Info("dependancy checks failed", goclone.GetGoPath(), err)
+ os.Exit(-1)
+ }
+ if match {
+ log.Printf("dependancy checks indicate a new release is needed for %s\n", goclone.GetGoPath())
+ } else {
+ log.Printf("dependancies have not changed for %s\n", goclone.GetGoPath())
}
if argv.SaveConfig {