summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-28 21:33:20 -0500
committerJeff Carr <[email protected]>2025-10-28 21:33:20 -0500
commit4320bb66a4fdeaab25af5bfcd5badf43b354f317 (patch)
treedd050c1eed782cbc105a94d4911c6a9d0af06684
parent61d1215aec93fd8f38c95e43d212556621e66bb4 (diff)
this all needs to be redone
-rw-r--r--complete.go10
-rw-r--r--doBuild.go6
-rw-r--r--structs.go4
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")
diff --git a/doBuild.go b/doBuild.go
index 6bd70f8..2f8a1bd 100644
--- a/doBuild.go
+++ b/doBuild.go
@@ -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
}
diff --git a/structs.go b/structs.go
index aa71526..f67c80a 100644
--- a/structs.go
+++ b/structs.go
@@ -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() {