summaryrefslogtreecommitdiffstats
path: root/cmd/deploy/deploy.go
diff options
context:
space:
mode:
authorbndw <ben@bdw.to>2026-01-23 21:19:50 -0800
committerbndw <ben@bdw.to>2026-01-23 21:19:50 -0800
commit1694ba1b8ad68e2d2ad21c1442c29b6f3f2c1632 (patch)
tree9411bc6b4b273263e31b33aa37dead47cdec4be4 /cmd/deploy/deploy.go
parentb5d97f633c960a826577fd80cb1d29e392dce34b (diff)
Make deploy the default action and require --binary
- Remove "deploy" subcommand, deploy is now the default action - Require --binary flag explicitly (no auto-discovery) - Add "rm" as alias for "remove" - Update help text
Diffstat (limited to 'cmd/deploy/deploy.go')
-rw-r--r--cmd/deploy/deploy.go25
1 files changed, 7 insertions, 18 deletions
diff --git a/cmd/deploy/deploy.go b/cmd/deploy/deploy.go
index ee7ee4a..31aabe5 100644
--- a/cmd/deploy/deploy.go
+++ b/cmd/deploy/deploy.go
@@ -78,26 +78,15 @@ func runDeploy(args []string) {
78} 78}
79 79
80func deployApp(host, domain, name, binaryPath string, portOverride int, envVars []string, envFile, args string, files []string) { 80func deployApp(host, domain, name, binaryPath string, portOverride int, envVars []string, envFile, args string, files []string) {
81 // Determine app name 81 // Require binary path
82 if name == "" { 82 if binaryPath == "" {
83 if binaryPath != "" { 83 fmt.Fprintf(os.Stderr, "Error: --binary is required\n")
84 name = filepath.Base(binaryPath) 84 os.Exit(1)
85 } else {
86 // Try to find a binary in current directory
87 cwd, _ := os.Getwd()
88 name = filepath.Base(cwd)
89 }
90 } 85 }
91 86
92 // Find binary if not specified 87 // Determine app name from binary if not specified
93 if binaryPath == "" { 88 if name == "" {
94 // Look for binary with same name as directory 89 name = filepath.Base(binaryPath)
95 if _, err := os.Stat(name); err == nil {
96 binaryPath = name
97 } else {
98 fmt.Fprintf(os.Stderr, "Error: --binary is required (could not find binary in current directory)\n")
99 os.Exit(1)
100 }
101 } 90 }
102 91
103 // Verify binary exists 92 // Verify binary exists