summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
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")