summaryrefslogtreecommitdiff
path: root/cmd/ponzu/main.go
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2017-01-19 09:09:44 -0800
committerSteve Manuel <nilslice@gmail.com>2017-01-19 09:09:44 -0800
commit4aae7bc1ebe1f2e51322ff8a991c7fa6f3c48168 (patch)
treeb67b531f2b9d30df2b8879010c6fe1b7594955bd /cmd/ponzu/main.go
parente397126da64633910a45631bced499943d1443a6 (diff)
adding upgrade and version to CLI usage and help command, fixing issue #31 with ponzu version printing project version
Diffstat (limited to 'cmd/ponzu/main.go')
-rw-r--r--cmd/ponzu/main.go15
1 files changed, 13 insertions, 2 deletions
diff --git a/cmd/ponzu/main.go b/cmd/ponzu/main.go
index 77e6708..f16e24b 100644
--- a/cmd/ponzu/main.go
+++ b/cmd/ponzu/main.go
@@ -19,11 +19,13 @@ import (
)
var (
- usage = usageHeader + usageNew + usageGenerate + usageBuild + usageRun
+ usage = usageHeader + usageNew + usageGenerate +
+ usageBuild + usageRun + usageUpgrade + usageVersion
port int
httpsport int
https bool
devhttps bool
+ cli bool
// for ponzu internal / core development
dev bool
@@ -41,6 +43,7 @@ func main() {
flag.BoolVar(&https, "https", false, "enable automatic TLS/SSL certificate management")
flag.BoolVar(&devhttps, "devhttps", false, "[dev environment] enable automatic TLS/SSL certificate management")
flag.BoolVar(&dev, "dev", false, "modify environment for Ponzu core development")
+ flag.BoolVar(&cli, "cli", false, "specify that information should be returned about the CLI, not project")
flag.StringVar(&fork, "fork", "", "modify repo source for Ponzu core development")
flag.StringVar(&gocmd, "gocmd", "go", "custom go command if using beta or new release of Go")
flag.Parse()
@@ -76,6 +79,14 @@ func main() {
case "run":
fmt.Println(usageRun)
os.Exit(0)
+
+ case "upgrade":
+ fmt.Println(usageUpgrade)
+ os.Exit(0)
+
+ case "version", "v":
+ fmt.Println(usageVersion)
+ os.Exit(0)
}
case "new":
@@ -219,7 +230,7 @@ func main() {
case "version", "v":
// read ponzu.json value to Stdout
- p, err := ponzu()
+ p, err := ponzu(cli)
if err != nil {
fmt.Println(err)
os.Exit(1)