diff options
| author | Jeff Carr <[email protected]> | 2025-10-07 17:39:44 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-07 17:39:44 -0500 |
| commit | 8a207ef6722d9baac437a436c35f66eea61881f3 (patch) | |
| tree | 39ca8573c35c319dddd2b2410dc595e484a08623 | |
| parent | c09ea79a8dd4c6ac5f6929230fdcdfb04139f740 (diff) | |
argv updates
| -rw-r--r-- | argv.go | 23 | ||||
| -rw-r--r-- | doBuild.go | 4 | ||||
| -rw-r--r-- | doc.go | 41 | ||||
| -rw-r--r-- | main.go | 4 |
4 files changed, 35 insertions, 37 deletions
@@ -36,11 +36,14 @@ type args struct { func (args) Examples() string { var out string - out += "forge add # scan your current directory for all git repos\n" - out += "forge user fix # the defaults for 'normal' forge distributed development (makes a user branch in every git repo)\n" + out += "forge show # show the state of all your repos\n" + out += "forge normal # the defaults for 'normal' forge distributed development\n" + out += " # it will makes a user branch in every git repo\n" + out += "forge clean # removes changes forge might have made\n" + out += " # purges all untracked git files, etc\n" out += "forge pull --force # 'git pull' on all repos\n" out += "forge merge --all # merge all patches to devel & master\n" - out += "forge reset fix # smartly restore all git repos to the upstream state (removes changes forge might have made)\n" + out += "forge add # scan your current directory for all git repos\n" return out } @@ -83,15 +86,15 @@ type CommitCmd struct { } type DevCmd struct { - Config *ConfigCmd `arg:"subcommand:config" help:"show your .config/forge/ settings"` - Build string `arg:"--build" help:"build a repo"` - Install string `arg:"--install" help:"install a repo"` - BuildForge bool `arg:"--forge-rebuild" help:"download and rebuild forge"` - URL string `arg:"--connect" help:"forge url"` + Config *ConfigCmd `arg:"subcommand:config" help:"show your .config/forge/ settings"` + Generate *EmptyCmd `arg:"subcommand:generate" help:"run go generate"` + Build *EmptyCmd `arg:"subcommand:build" help:"build this repo"` + Install *EmptyCmd `arg:"subcommand:install" help:"build & install this repo"` DeleteUser bool `arg:"--delete-user" help:"delete all user branches (checks for safety)"` - Fix bool `arg:"--fix" help:"actually do it"` - Prune bool `arg:"--prune" help:"git fetch prune"` + BuildForge bool `arg:"--forge-rebuild" help:"download all the forge sources and rebuild forge"` + URL string `arg:"--connect" help:"forge url"` Untracked bool `arg:"--untracked" help:"git untracked file list"` + Prune bool `arg:"--prune" help:"'git fetch --prune' everywhere"` } type CleanCmd struct { @@ -17,7 +17,7 @@ func doBuild() error { v = []string{"-v", "-x"} } - gopath := argv.Dev.Build + gopath := "fixme build" repo := me.forge.Repos.FindByNamespace(gopath) if repo == nil { @@ -36,7 +36,7 @@ func doInstall() error { v = []string{"-v", "-x"} } - gopath := argv.Dev.Install + gopath := "fixme build" repo := me.forge.Repos.FindByNamespace(gopath) if repo == nil { return fmt.Errorf("rep not found: %s", gopath) @@ -3,39 +3,34 @@ forge -- a tool to manage lots of git repos. forge includes a GUI and TUI. forge only executes the 'git' command. Everything it does, you can run by hand with 'git'. + Orginally written to maintain the +50 GO git repositories for the WIT Private Cloud + Options: - --debugger open the debugger window - --logger open the log.* control window + --all whatever you are doing, do it all over + --force try to strong-arm things + --verbose show more output than usual + --fix try to make repairs --gui GUI select the plugin (andlabs,gocui,etc) - --gui-verbose enable all logging --bash generate bash completion - --bash generate bash completion - --connect CONNECT forge url - --all git commit --all - --build BUILD build a repo - --install INSTALL install a repo - --forge-rebuild download and rebuild forge - --force try to strong arm things - --verbose show more output + --debugger open the debugger window + --logger open the log.* control window --help, -h display this help and exit --version display version and exit Commands: - help New to forge? This is for you.' - checkout switch branches using 'git checkout' - clean start over at the beginning - commit 'git commit' but errors out if on wrong branch - config show your .config/forge/ settings - dirty show dirty git repos - fetch run 'git fetch master' + checkout 'git checkout' + clean 'git clean' + reset repos to original state + commit 'git commit' gui open the gui - list print a table of the current repos merge merge branches - normal set every repo to the default state for software development - patch make patchsets - pull run 'git pull' - tag manage git tags + normal shortcut to 'forge mode normal' + mode sets the mode (hacking, merging, publishing) + patch work with patchsets + pull 'git pull' + show print out things + dev features under development + add Scan directores for git repos */ package main @@ -82,12 +82,12 @@ func main() { } if argv.Dev != nil { - if argv.Dev.Install != "" { + if argv.Dev.Install != nil { if err := doInstall(); err != nil { badExit(err) } } - if argv.Dev.Build != "" { + if argv.Dev.Build != nil { if err := doBuild(); err != nil { badExit(err) } |
