diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..29a4568 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ + +code-push-go diff --git a/opt/app.go b/opt/app.go index f67ff56..4752a6c 100644 --- a/opt/app.go +++ b/opt/app.go @@ -48,12 +48,12 @@ func (App) CreateBundle() { flag.StringVar(&targetVersion, "t", "", "Target version") flag.StringVar(&appName, "n", "", "AppName") - flag.StringVar(&deployment, "d", "prod", "deployment") - flag.StringVar(&rnDir, "p", "./", "react native project dir") + flag.StringVar(&deployment, "d", "", "DeploymentName") + flag.StringVar(&rnDir, "p", "./", "React native project dir") flag.Parse() - if targetVersion == "" || appName == "" { - fmt.Println("Usage: code-push-go create_bundle -t -n -d ") + if targetVersion == "" || appName == "" || deployment == "" { + fmt.Println("Usage: code-push-go create_bundle -t -n -d -p <*Optional React native project dir>") return } log.Println("Get app info...") @@ -393,6 +393,7 @@ func (App) lsDeployment() { flag.Parse() if appName == "" { fmt.Println("Usage: code-push-go app ls_deployment -n -k (Show deployment key)") + return } createDeploymentInfo := lsDeploymentReq{