summaryrefslogtreecommitdiff
path: root/validate/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-12-01 12:53:46 -0600
committerJeff Carr <[email protected]>2024-12-01 12:53:46 -0600
commitfd3b806b4a1f647103c7ecb417cf1ffced9c4cb1 (patch)
treeafa31f225f924891a67011db8f33abcdea63e0f8 /validate/main.go
parentf24d8131c3f995f9c24a37cb5a8e46da840f2eb0 (diff)
add test appv0.0.13
Diffstat (limited to 'validate/main.go')
-rw-r--r--validate/main.go50
1 files changed, 50 insertions, 0 deletions
diff --git a/validate/main.go b/validate/main.go
new file mode 100644
index 0000000..da709e0
--- /dev/null
+++ b/validate/main.go
@@ -0,0 +1,50 @@
+package main
+
+import (
+ "os"
+
+ "go.wit.com/dev/alexflint/arg"
+ "go.wit.com/gui"
+ "go.wit.com/lib/gui/repolist"
+ "go.wit.com/lib/protobuf/forgepb"
+ "go.wit.com/lib/protobuf/gitpb"
+ "go.wit.com/log"
+)
+
+// sent via ldflags
+var VERSION string
+
+var pp *arg.Parser
+var forge *forgepb.Forge
+var myGui *gui.Node
+var rv *repolist.RepoList
+var argvRepo *gitpb.Repo
+
+func main() {
+ pp = arg.MustParse(&argv)
+
+ // load the ~/.config/forge/ config
+ forge = forgepb.Init()
+ // forge.ConfigPrintTable()
+ os.Setenv("REPO_WORK_PATH", forge.GetGoSrc())
+
+ myGui = gui.New()
+ myGui.Default()
+
+ repos := forge.Repos.SortByGoPath()
+ for repos.Scan() {
+ repo := repos.Next()
+ 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)
+ }
+
+ if argv.SaveConfig {
+ forge.Repos.ConfigSave()
+ }
+
+ os.Exit(0)
+}