diff options
Diffstat (limited to 'cmd/ship/main.go')
| -rw-r--r-- | cmd/ship/main.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/ship/main.go b/cmd/ship/main.go index 27fe8b7..a6984ec 100644 --- a/cmd/ship/main.go +++ b/cmd/ship/main.go | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | package main | 1 | package main |
| 2 | 2 | ||
| 3 | import ( | 3 | import ( |
| 4 | "fmt" | ||
| 4 | "os" | 5 | "os" |
| 5 | 6 | ||
| 6 | "github.com/bdw/ship/cmd/ship/env" | 7 | "github.com/bdw/ship/cmd/ship/env" |
| @@ -57,7 +58,7 @@ func init() { | |||
| 57 | rootCmd.Flags().String("binary", "", "Path to Go binary (for app deployment)") | 58 | rootCmd.Flags().String("binary", "", "Path to Go binary (for app deployment)") |
| 58 | rootCmd.Flags().Bool("static", false, "Deploy as static site") | 59 | rootCmd.Flags().Bool("static", false, "Deploy as static site") |
| 59 | rootCmd.Flags().String("dir", ".", "Directory to deploy (for static sites)") | 60 | rootCmd.Flags().String("dir", ".", "Directory to deploy (for static sites)") |
| 60 | rootCmd.Flags().String("domain", "", "Domain name (required)") | 61 | rootCmd.Flags().String("domain", "", "Custom domain (optional if base domain configured)") |
| 61 | rootCmd.Flags().String("name", "", "App name (default: inferred from binary or directory)") | 62 | rootCmd.Flags().String("name", "", "App name (default: inferred from binary or directory)") |
| 62 | rootCmd.Flags().Int("port", 0, "Port override (default: auto-allocate)") | 63 | rootCmd.Flags().Int("port", 0, "Port override (default: auto-allocate)") |
| 63 | rootCmd.Flags().StringArray("env", nil, "Environment variable (KEY=VALUE, can be specified multiple times)") | 64 | rootCmd.Flags().StringArray("env", nil, "Environment variable (KEY=VALUE, can be specified multiple times)") |
| @@ -79,6 +80,7 @@ func init() { | |||
| 79 | 80 | ||
| 80 | func main() { | 81 | func main() { |
| 81 | if err := rootCmd.Execute(); err != nil { | 82 | if err := rootCmd.Execute(); err != nil { |
| 83 | fmt.Fprintf(os.Stderr, "Error: %v\n", err) | ||
| 82 | os.Exit(1) | 84 | os.Exit(1) |
| 83 | } | 85 | } |
| 84 | } | 86 | } |
