summaryrefslogtreecommitdiff
path: root/argv.go
diff options
context:
space:
mode:
Diffstat (limited to 'argv.go')
-rw-r--r--argv.go86
1 files changed, 0 insertions, 86 deletions
diff --git a/argv.go b/argv.go
deleted file mode 100644
index 36176da..0000000
--- a/argv.go
+++ /dev/null
@@ -1,86 +0,0 @@
-package main
-
-import (
- "os"
-
- "go.wit.com/gui"
- "go.wit.com/lib/protobuf/argvpb"
-)
-
-/*
- this parses the command line arguements
-
- this enables command line options from other packages like 'gui' and 'log'
-*/
-
-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 {
-}
-
-func (a args) Description() string {
- return `
-Example usage:
- guireleaser go.wit.com/apps/go-clone --increment --release --dry-run --reason "blerg"
-
-This will pull down the go sources and
-the repositories in the go.sum file using git clone`
-}
-
-/*
- handles shell autocomplete
-*/
-
-func (args) Appname() string {
- return ARGNAME
-}
-
-func (args) Buildtime() (string, string) {
- return BUILDTIME, VERSION
-}
-
-func (args) ArgvGui() error {
- // me.myGui = fhelp.Gui() // adds the GUI package argv support
- me.origGui = gui.New()
- return nil
-}
-
-func (args) Version() string {
- return argvpb.StandardVersion(ARGNAME, VERSION, BUILDTIME)
-}
-
-// sends the strings to bash or zsh that will be your options
-func (a args) SendCompletionStrings(pb *argvpb.Argv) {
- if pb.Cmd == "" {
- base := []string{"--bash", "quick", "--dry-run", "--full", "--reason", "--version", "--auto-run", "--keep-gomod"}
- pb.SendStrings(base)
- } else {
- pb.SubCommand(pb.Goargs...)
- }
- os.Exit(0)
-}