From d0e1372a6e70493debbf6b0595ac3b2cec3c0a2e Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 1 Nov 2024 21:46:21 -0500 Subject: [PATCH] old code from forgotten commit Signed-off-by: Jeff Carr --- Makefile | 3 +++ argv.go | 11 ++++++----- main.go | 5 +++++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index bc93a15..7153cbb 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,9 @@ all: build single: build ./guireleaser go.wit.com/apps/go-clone --increment --release --reason "testing guireleaser" --dry-run +dump: + ./guireleaser go.wit.com/apps/go-clone --increment --release --reason "testing guireleaser" --dry-run --dump-versions + single-really-do-it: build ./guireleaser go.wit.com/apps/go-clone --increment --release --reason "testing guireleaser" diff --git a/argv.go b/argv.go index c54226e..0d7aa25 100644 --- a/argv.go +++ b/argv.go @@ -7,11 +7,12 @@ package main */ type args struct { - Repo string `arg:"positional" help:"go import path"` - Increment bool `arg:"--increment" help:"auto increment"` - Release bool `arg:"--release" help:"do a release an exit"` - DryRun bool `arg:"--dry-run,env:DRYRUN" help:"don't actually do the release"` - Reason string `arg:"--reason" help:"tag message"` + Repo string `arg:"positional" help:"go import path"` + Increment bool `arg:"--increment" help:"auto increment"` + Release bool `arg:"--release" help:"do a release an exit"` + DryRun bool `arg:"--dry-run,env:DRYRUN" help:"don't actually do the release"` + Reason string `arg:"--reason" help:"tag message"` + DumpVersions bool `arg:"--dump-versions" help:"dump the versions file for go.wit.com"` } func (a args) Description() string { diff --git a/main.go b/main.go index ac9959f..f5e4fac 100644 --- a/main.go +++ b/main.go @@ -6,6 +6,7 @@ import ( "go.wit.com/dev/alexflint/arg" "go.wit.com/gui" + "go.wit.com/lib/gui/gowit" "go.wit.com/lib/gui/repolist" "go.wit.com/lib/gui/shell" "go.wit.com/log" @@ -66,6 +67,10 @@ func main() { // which should be all the git repositories in ~/go/src & the .config file me.repos = makeRepoView() + if myargs.DumpVersions { + gowit.DumpVersions(me.repos.View) + os.Exit(0) + } // the left side of the window options globalDisplayOptions(me.mainBox)