summaryrefslogtreecommitdiffstats
path: root/cmd/deploy/version.go
diff options
context:
space:
mode:
authorbndw <ben@bdw.to>2026-01-23 21:52:50 -0800
committerbndw <ben@bdw.to>2026-01-23 21:52:50 -0800
commit87752492d0dc7df3cf78011d5ce315a3eb0cad51 (patch)
tree76843c127fece33f5c28dd7bd533044043478825 /cmd/deploy/version.go
parent57eb67df265a7a6bb544cde83a3be5eadf53fdf2 (diff)
Restructure CLI with Cobra
Replace custom switch-based routing with Cobra for cleaner command hierarchy. Reorganize commands into logical groups: - Root command handles deployment (--binary, --static, --domain, etc.) - App management at top level: list, logs, status, restart, remove - env subcommand group: list, set, unset - host subcommand group: init, status, update, ssh - Standalone: ui (renamed from webui), version Add version command with ldflags support for build info.
Diffstat (limited to 'cmd/deploy/version.go')
-rw-r--r--cmd/deploy/version.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/cmd/deploy/version.go b/cmd/deploy/version.go
new file mode 100644
index 0000000..d2cd430
--- /dev/null
+++ b/cmd/deploy/version.go
@@ -0,0 +1,17 @@
1package main
2
3import (
4 "fmt"
5
6 "github.com/spf13/cobra"
7)
8
9var versionCmd = &cobra.Command{
10 Use: "version",
11 Short: "Show version information",
12 Run: func(cmd *cobra.Command, args []string) {
13 fmt.Printf("deploy version %s\n", version)
14 fmt.Printf(" commit: %s\n", commit)
15 fmt.Printf(" built: %s\n", date)
16 },
17}