From 1694ba1b8ad68e2d2ad21c1442c29b6f3f2c1632 Mon Sep 17 00:00:00 2001 From: bndw Date: Fri, 23 Jan 2026 21:19:50 -0800 Subject: 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 --- cmd/deploy/deploy.go | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) (limited to 'cmd/deploy/deploy.go') 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) { } func deployApp(host, domain, name, binaryPath string, portOverride int, envVars []string, envFile, args string, files []string) { - // Determine app name - if name == "" { - if binaryPath != "" { - name = filepath.Base(binaryPath) - } else { - // Try to find a binary in current directory - cwd, _ := os.Getwd() - name = filepath.Base(cwd) - } + // Require binary path + if binaryPath == "" { + fmt.Fprintf(os.Stderr, "Error: --binary is required\n") + os.Exit(1) } - // Find binary if not specified - if binaryPath == "" { - // Look for binary with same name as directory - if _, err := os.Stat(name); err == nil { - binaryPath = name - } else { - fmt.Fprintf(os.Stderr, "Error: --binary is required (could not find binary in current directory)\n") - os.Exit(1) - } + // Determine app name from binary if not specified + if name == "" { + name = filepath.Base(binaryPath) } // Verify binary exists -- cgit v1.2.3