From 456305122d43bdabf26a1c16f7f550de40cc2a5c Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 26 Oct 2025 10:17:06 -0500 Subject: new argv (much better) --- argv.go | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 argv.go (limited to 'argv.go') diff --git a/argv.go b/argv.go new file mode 100644 index 0000000..2958de4 --- /dev/null +++ b/argv.go @@ -0,0 +1,33 @@ +package main + +var argv args + +type args struct { + Quick *QuickCmd `arg:"subcommand:quick" help:"only do repos with patches"` + Gui *EmptyCmd `arg:"subcommand:gui" help:"triggers the gui"` + DryRun bool `arg:"--dry-run,env:DRYRUN" help:"don't actually do the release"` + Minor bool `arg:"--minor" help:"increment minor verion numbers"` + Protobuf bool `arg:"--protobuf" help:"increment protobuf repos"` + KeepGOMOD bool `arg:"--keep-gomod" help:"keep go.* and *.pb.go files in master"` + Verbose bool `arg:"--verbose" help:"talk alot"` + Full bool `arg:"--full" help:"build every package"` + Reason string `arg:"--reason" help:"tag message"` + Force bool `arg:"--force" help:"try harder than normal"` + AutoRun bool `arg:"--auto-run" help:"automatically process everything"` + Port int `arg:"--port" default:"9419" help:"do fun stuff with curl"` +} + +func (args) Examples() string { + var out string + out += "guireleaser --full # release everything\n" + return out +} + +type QuickCmd struct { + List *EmptyCmd `arg:"subcommand:list" help:"list available patches"` + Show *EmptyCmd `arg:"subcommand:show" help:"show a specific patch"` + NoLibs *EmptyCmd `arg:"subcommand:show" help:"skip libraries that aren't changed"` +} + +type EmptyCmd struct { +} -- cgit v1.2.3