deprecate go specific stuff

This commit is contained in:
Jeff Carr 2024-12-24 03:00:55 -06:00
parent 2f7c1807a1
commit 778de10e87
4 changed files with 14 additions and 70 deletions

View File

@ -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

27
argv.go
View File

@ -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)"`

View File

@ -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)
}
*/
}

View File

@ -126,11 +126,6 @@ func main() {
done = true
}
if argv.Do.RedoGoMod {
doRedoGoMod()
done = true
}
if argv.Do.GitPull {
doGitPull()
done = true