summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-12-24 03:00:55 -0600
committerJeff Carr <[email protected]>2024-12-24 03:00:55 -0600
commit778de10e871c5d25d9c746eb54f1752b7c124f6d (patch)
treeafe7411a5251f243ff185c55a921e7ae2cd23302
parent2f7c1807a1e6fbc9c43c247c5374748ce0cecd79 (diff)
deprecate go specific stuff
-rw-r--r--Makefile24
-rw-r--r--argv.go27
-rw-r--r--doRedoGoMod.go28
-rw-r--r--main.go5
4 files changed, 14 insertions, 70 deletions
diff --git a/Makefile b/Makefile
index e0ef7b6..ef0dbb1 100644
--- a/Makefile
+++ b/Makefile
@@ -34,41 +34,35 @@ goimports:
gocui: install
forge --gui gocui >/tmp/forge.log 2>&1
-redomod-all:
- forge --do-RedoGoMod
-
-redomod-erase:
- forge --do-RedoGoMod --do-erase
-
private: install
- forge --find-private
+ forge find --private
fix: install
- forge --fix --find-all
+ forge --fix find --all
list-all: install
- forge --find-all
+ forge find --all
git-reset: install
- forge --do-git-reset --find-all
+ forge --do-git-reset find --all
readonly: install
- forge --do-list --find-readonly
+ forge --do-list find --readonly
config: install
forge --config
scan: install
- forge --do-scan
+ forge do --scan
pull: install
- forge --do-git-pull
+ forge do --pull
mine: install
- forge --find-mine
+ forge find --mine
all: install
- forge --find-all
+ forge find --all
patches: install
forge --do-patches
diff --git a/argv.go b/argv.go
index a32f87d..8eed65e 100644
--- a/argv.go
+++ b/argv.go
@@ -15,30 +15,13 @@ type FindCmd struct {
}
type DoCmd struct {
- List bool `arg:"--list" help:"just show a table of the current state"`
- Clone bool `arg:"--clone" help:"git clone build dependancies"`
- Scan bool `arg:"--scan" help:"reload protobuf from .git/"`
- Force bool `arg:"--force" help:"force redo things"`
- GitPull bool `arg:"--git-pull" help:"run 'git pull'"`
- GitReset bool `arg:"--git-reset" help:"run 'git reset --hard'"`
- Build bool `arg:"--build" default:"true" help:"try to build it"`
- Install bool `arg:"--install" help:"also try to install it"`
- RedoGoMod bool `arg:"--RedoGoMod" help:"remake all the go.sum and go.mod files"`
+ List bool `arg:"--list" help:"just show a table of the current state"`
+ GitPull bool `arg:"--pull" help:"run 'git pull'"`
+ GitReset bool `arg:"--git-reset" help:"run 'git reset --hard'"`
+ Scan bool `arg:"--scan" help:"reload protobuf from .git/"`
+ Force bool `arg:"--force" help:"force redo things"`
}
-/*
-arg.MustParse(&args)
-
-switch {
-case args.Checkout != nil:
- fmt.Printf("checkout requested for branch %s\n", args.Checkout.Branch)
-case args.Commit != nil:
- fmt.Printf("commit requested with message \"%s\"\n", args.Commit.Message)
-case args.Push != nil:
- fmt.Printf("push requested from %s to %s\n", args.Push.Branch, args.Push.Remote)
-}
-*/
-
type args struct {
Find *FindCmd `arg:"subcommand:find" help:"select repos (for example, --all or --mine)"`
Do *DoCmd `arg:"subcommand:do" help:"do something ('git pull', 'build', 'install', etc)"`
diff --git a/doRedoGoMod.go b/doRedoGoMod.go
deleted file mode 100644
index a3cbf22..0000000
--- a/doRedoGoMod.go
+++ /dev/null
@@ -1,28 +0,0 @@
-package main
-
-// An app to submit patches for the 30 GO GUI repos
-
-func doRedoGoMod() {
- // me.forge.RillRedoGoMod()
- all := me.forge.Repos.SortByFullPath()
- for all.Scan() {
- repo := all.Next()
- if err := repo.ValidGoSum(); err == nil {
- continue
- }
- if err := repo.RunStrict([]string{"go-mod-clean"}); err != nil {
- badExit(err)
- }
- }
-}
-
-func doEraseGoMod() {
- /*
- var cmds [][]string
- cmds = append(cmds, []string{"rm", "-f", "go.mod", "go.sum"})
- errs := me.forge.RillCmds(me.packs, cmds)
- foreach x, y := range errs {
- log.Info("EraseGoMod() error", x.GoPath, y)
- }
- */
-}
diff --git a/main.go b/main.go
index 5ec2f5c..cb3b4a8 100644
--- a/main.go
+++ b/main.go
@@ -126,11 +126,6 @@ func main() {
done = true
}
- if argv.Do.RedoGoMod {
- doRedoGoMod()
- done = true
- }
-
if argv.Do.GitPull {
doGitPull()
done = true