summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-17 06:20:55 -0600
committerJeff Carr <[email protected]>2025-01-17 06:20:55 -0600
commit68ee252acd016e2880c4fa38c7555250c7965e44 (patch)
tree51000a8b5a239f422f02a88d891d9a90c7a2d0e8 /main.go
parent9431656ae80de57233cd5e721132c93699b22615 (diff)
add bash supportv0.23.23
Diffstat (limited to 'main.go')
-rw-r--r--main.go16
1 files changed, 13 insertions, 3 deletions
diff --git a/main.go b/main.go
index 311a04d..1129afe 100644
--- a/main.go
+++ b/main.go
@@ -17,6 +17,7 @@ import (
)
var VERSION string
+var ARGNAME string = "guireleaser"
//go:embed resources/*
var resources embed.FS
@@ -26,6 +27,18 @@ var argv args
func main() {
me = new(autoType)
+ // parse the command line
+ me.pp = arg.MustParse(&argv)
+
+ if argv.Bash {
+ argv.doBash()
+ os.Exit(0)
+ }
+ if len(argv.BashAuto) != 0 {
+ argv.doBashAuto()
+ os.Exit(0)
+ }
+
// load the ~/.config/forge/ config
me.forge = forgepb.Init()
me.found = new(gitpb.Repos)
@@ -53,9 +66,6 @@ func main() {
// me.forge.ConfigPrintTable()
os.Setenv("REPO_WORK_PATH", me.forge.GetGoSrc())
- // parse the command line
- arg.MustParse(&argv)
-
// save the ENV var here
me.releaseReasonS = os.Getenv("GUIRELEASE_REASON")