diff options
| author | Jeff Carr <[email protected]> | 2025-10-28 21:33:20 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-28 21:33:20 -0500 |
| commit | 4320bb66a4fdeaab25af5bfcd5badf43b354f317 (patch) | |
| tree | dd050c1eed782cbc105a94d4911c6a9d0af06684 | |
| parent | 61d1215aec93fd8f38c95e43d212556621e66bb4 (diff) | |
this all needs to be redone
| -rw-r--r-- | complete.go | 10 | ||||
| -rw-r--r-- | doBuild.go | 6 | ||||
| -rw-r--r-- | structs.go | 4 |
3 files changed, 12 insertions, 8 deletions
diff --git a/complete.go b/complete.go index 6f6478a..4abd80e 100644 --- a/complete.go +++ b/complete.go @@ -21,11 +21,6 @@ var BUILDTIME string // used for shell auto completion var APPNAME string = "wit" // todo: get this from $0 ? -func (args) MustParse() error { - me.pp = arg.MustParseArgv(&argv) - return nil -} - /* func (args) MustParse() error { me.pp = arg.MustParse(&argv) @@ -83,6 +78,11 @@ func (a args) DoAutoComplete() error { return err } +func (args) MustParse() error { + me.pp = arg.MustParseArgv(&argv) + return nil +} + func (args) Match() bool { base := []string{"build", "upgrade", "git", "publish", "pb", "linux", "droplet", "test"} base = append(base, "--version", "--force", "--all", "--dry-run", "--verbose") @@ -24,7 +24,7 @@ func doBuild() (string, error) { // log.Info("doInstall() failed", err) argvpb.BadExit("doInstall() failed", err) } - if argv.DryRun { + if env.True("--dry-run") { argvpb.GoodExit("Nothing built --dry-run") } argvpb.GoodExit("EVERYTHING BUILT!") @@ -116,7 +116,7 @@ func doBuild() (string, error) { footer := cobol.SimpleTable(simpletable) log.Info("simple build table footer:", footer) - if argv.DryRun { + if env.True("--dry-run") { return "dryrun", nil } @@ -150,7 +150,7 @@ func doInstall(all *gitpb.Repos) error { footer := found.PrintForgedTable() log.Info("Starting 'go install' on these repos:", footer) - if argv.DryRun { + if env.True("--dry-run") { return nil } @@ -8,6 +8,7 @@ import ( "go.wit.com/dev/alexflint/arg" "go.wit.com/lib/debian" + "go.wit.com/lib/env" "go.wit.com/lib/fhelp" "go.wit.com/lib/protobuf/argvpb" "go.wit.com/lib/protobuf/forgepb" @@ -37,6 +38,9 @@ func initForge() { me.forge.RescanRepos() } initMachine() + if env.Verbose() { + env.PrintTable() + } } func initMachine() { |
