diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 27 |
1 files changed, 25 insertions, 2 deletions
@@ -3,7 +3,6 @@ package main // An app to submit patches for the 30 GO GUI repos import ( - "os" "strings" "go.wit.com/dev/alexflint/arg" @@ -19,6 +18,15 @@ var BUILDTIME string // using this for now. triggers config save var configSave bool +func getVersion(repo *gitpb.Repo, name string) string { + cmd := []string{"git", "describe", "--tags", "--always", name} + result := repo.RunQuiet(cmd) + output := strings.Join(result.Stdout, "\n") + log.Info("cmd =", cmd, output) + + return strings.TrimSpace(output) +} + func main() { me = new(mainType) me.pp = arg.MustParse(&argv) @@ -29,6 +37,20 @@ func main() { me.forge = forgepb.Init() me.found = new(gitpb.Repos) + if configSave { + me.forge.ConfigSave() + configSave = false + } + + /* + // var count int + all := me.forge.Repos.SortByFullPath() + for all.Scan() { + repo := all.Next() + verifyPrint(repo) + } + */ + if argv.Fix { okExit("") } @@ -37,7 +59,7 @@ func main() { if argv.Config { if findConfig() { me.forge.ConfigPrintTable() - os.Exit(0) + okExit("") } } else { findRepos() @@ -93,4 +115,5 @@ func main() { // if nothing was selected, print out a table of them on STDOUT doCobol() } + okExit("") } |
