summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorbndw <ben@bdw.to>2026-01-24 09:48:34 -0800
committerbndw <ben@bdw.to>2026-01-24 09:48:34 -0800
commit5861e465a2ccf31d87ea25ac145770786f9cc96e (patch)
tree4ac6b57a06b46d8492717b235909f9e0db0b4f22 /cmd
parentef37850c7090493cf2b26d2e565511fe23cc9bfc (diff)
Rename project from deploy to ship
- Rename module to github.com/bdw/ship - Rename cmd/deploy to cmd/ship - Update all import paths - Update config path from ~/.config/deploy to ~/.config/ship - Update VPS env path from /etc/deploy to /etc/ship - Update README, Makefile, and docs
Diffstat (limited to 'cmd')
-rw-r--r--cmd/ship/env/env.go (renamed from cmd/deploy/env/env.go)0
-rw-r--r--cmd/ship/env/list.go (renamed from cmd/deploy/env/list.go)2
-rw-r--r--cmd/ship/env/set.go (renamed from cmd/deploy/env/set.go)6
-rw-r--r--cmd/ship/env/unset.go (renamed from cmd/deploy/env/unset.go)6
-rw-r--r--cmd/ship/host/host.go (renamed from cmd/deploy/host/host.go)0
-rw-r--r--cmd/ship/host/init.go (renamed from cmd/deploy/host/init.go)14
-rw-r--r--cmd/ship/host/ssh.go (renamed from cmd/deploy/host/ssh.go)2
-rw-r--r--cmd/ship/host/status.go (renamed from cmd/deploy/host/status.go)4
-rw-r--r--cmd/ship/host/update.go (renamed from cmd/deploy/host/update.go)4
-rw-r--r--cmd/ship/list.go (renamed from cmd/deploy/list.go)2
-rw-r--r--cmd/ship/logs.go (renamed from cmd/deploy/logs.go)4
-rw-r--r--cmd/ship/main.go (renamed from cmd/deploy/main.go)10
-rw-r--r--cmd/ship/remove.go (renamed from cmd/deploy/remove.go)6
-rw-r--r--cmd/ship/restart.go (renamed from cmd/deploy/restart.go)4
-rw-r--r--cmd/ship/root.go (renamed from cmd/deploy/root.go)8
-rw-r--r--cmd/ship/status.go (renamed from cmd/deploy/status.go)4
-rw-r--r--cmd/ship/templates/webui.html (renamed from cmd/deploy/templates/webui.html)0
-rw-r--r--cmd/ship/ui.go (renamed from cmd/deploy/ui.go)8
-rw-r--r--cmd/ship/version.go (renamed from cmd/deploy/version.go)2
19 files changed, 43 insertions, 43 deletions
diff --git a/cmd/deploy/env/env.go b/cmd/ship/env/env.go
index 489353a..489353a 100644
--- a/cmd/deploy/env/env.go
+++ b/cmd/ship/env/env.go
diff --git a/cmd/deploy/env/list.go b/cmd/ship/env/list.go
index af92171..ad76eb6 100644
--- a/cmd/deploy/env/list.go
+++ b/cmd/ship/env/list.go
@@ -4,7 +4,7 @@ import (
4 "fmt" 4 "fmt"
5 "strings" 5 "strings"
6 6
7 "github.com/bdw/deploy/internal/state" 7 "github.com/bdw/ship/internal/state"
8 "github.com/spf13/cobra" 8 "github.com/spf13/cobra"
9) 9)
10 10
diff --git a/cmd/deploy/env/set.go b/cmd/ship/env/set.go
index 35d77ff..e11d2c9 100644
--- a/cmd/deploy/env/set.go
+++ b/cmd/ship/env/set.go
@@ -6,8 +6,8 @@ import (
6 "os" 6 "os"
7 "strings" 7 "strings"
8 8
9 "github.com/bdw/deploy/internal/ssh" 9 "github.com/bdw/ship/internal/ssh"
10 "github.com/bdw/deploy/internal/state" 10 "github.com/bdw/ship/internal/state"
11 "github.com/spf13/cobra" 11 "github.com/spf13/cobra"
12) 12)
13 13
@@ -89,7 +89,7 @@ func runSet(cmd *cobra.Command, args []string) error {
89 defer client.Close() 89 defer client.Close()
90 90
91 fmt.Println("-> Updating environment file on VPS...") 91 fmt.Println("-> Updating environment file on VPS...")
92 envFilePath := fmt.Sprintf("/etc/deploy/env/%s.env", name) 92 envFilePath := fmt.Sprintf("/etc/ship/env/%s.env", name)
93 envContent := "" 93 envContent := ""
94 for k, v := range app.Env { 94 for k, v := range app.Env {
95 envContent += fmt.Sprintf("%s=%s\n", k, v) 95 envContent += fmt.Sprintf("%s=%s\n", k, v)
diff --git a/cmd/deploy/env/unset.go b/cmd/ship/env/unset.go
index 65a8986..7d9a141 100644
--- a/cmd/deploy/env/unset.go
+++ b/cmd/ship/env/unset.go
@@ -3,8 +3,8 @@ package env
3import ( 3import (
4 "fmt" 4 "fmt"
5 5
6 "github.com/bdw/deploy/internal/ssh" 6 "github.com/bdw/ship/internal/ssh"
7 "github.com/bdw/deploy/internal/state" 7 "github.com/bdw/ship/internal/state"
8 "github.com/spf13/cobra" 8 "github.com/spf13/cobra"
9) 9)
10 10
@@ -73,7 +73,7 @@ func runUnset(cmd *cobra.Command, args []string) error {
73 defer client.Close() 73 defer client.Close()
74 74
75 fmt.Println("-> Updating environment file on VPS...") 75 fmt.Println("-> Updating environment file on VPS...")
76 envFilePath := fmt.Sprintf("/etc/deploy/env/%s.env", name) 76 envFilePath := fmt.Sprintf("/etc/ship/env/%s.env", name)
77 envContent := "" 77 envContent := ""
78 for k, v := range app.Env { 78 for k, v := range app.Env {
79 envContent += fmt.Sprintf("%s=%s\n", k, v) 79 envContent += fmt.Sprintf("%s=%s\n", k, v)
diff --git a/cmd/deploy/host/host.go b/cmd/ship/host/host.go
index 603a946..603a946 100644
--- a/cmd/deploy/host/host.go
+++ b/cmd/ship/host/host.go
diff --git a/cmd/deploy/host/init.go b/cmd/ship/host/init.go
index 984e5d3..ea25922 100644
--- a/cmd/deploy/host/init.go
+++ b/cmd/ship/host/init.go
@@ -4,8 +4,8 @@ import (
4 "fmt" 4 "fmt"
5 "strings" 5 "strings"
6 6
7 "github.com/bdw/deploy/internal/ssh" 7 "github.com/bdw/ship/internal/ssh"
8 "github.com/bdw/deploy/internal/state" 8 "github.com/bdw/ship/internal/state"
9 "github.com/spf13/cobra" 9 "github.com/spf13/cobra"
10) 10)
11 11
@@ -75,8 +75,8 @@ import /etc/caddy/sites-enabled/*
75 fmt.Println(" Caddyfile created") 75 fmt.Println(" Caddyfile created")
76 76
77 fmt.Println("-> Creating directories...") 77 fmt.Println("-> Creating directories...")
78 if _, err := client.RunSudo("mkdir -p /etc/deploy/env"); err != nil { 78 if _, err := client.RunSudo("mkdir -p /etc/ship/env"); err != nil {
79 return fmt.Errorf("error creating /etc/deploy/env: %w", err) 79 return fmt.Errorf("error creating /etc/ship/env: %w", err)
80 } 80 }
81 if _, err := client.RunSudo("mkdir -p /etc/caddy/sites-enabled"); err != nil { 81 if _, err := client.RunSudo("mkdir -p /etc/caddy/sites-enabled"); err != nil {
82 return fmt.Errorf("error creating /etc/caddy/sites-enabled: %w", err) 82 return fmt.Errorf("error creating /etc/caddy/sites-enabled: %w", err)
@@ -111,10 +111,10 @@ import /etc/caddy/sites-enabled/*
111 111
112 fmt.Println("\nVPS initialized successfully!") 112 fmt.Println("\nVPS initialized successfully!")
113 fmt.Println("\nNext steps:") 113 fmt.Println("\nNext steps:")
114 fmt.Println(" 1. Deploy a Go app:") 114 fmt.Println(" 1. Deploy an app:")
115 fmt.Printf(" deploy --binary ./myapp --domain api.example.com\n") 115 fmt.Printf(" ship --binary ./myapp --domain api.example.com\n")
116 fmt.Println(" 2. Deploy a static site:") 116 fmt.Println(" 2. Deploy a static site:")
117 fmt.Printf(" deploy --static --dir ./dist --domain example.com\n") 117 fmt.Printf(" ship --static --dir ./dist --domain example.com\n")
118 return nil 118 return nil
119} 119}
120 120
diff --git a/cmd/deploy/host/ssh.go b/cmd/ship/host/ssh.go
index a33986f..e480e47 100644
--- a/cmd/deploy/host/ssh.go
+++ b/cmd/ship/host/ssh.go
@@ -5,7 +5,7 @@ import (
5 "os" 5 "os"
6 "os/exec" 6 "os/exec"
7 7
8 "github.com/bdw/deploy/internal/state" 8 "github.com/bdw/ship/internal/state"
9 "github.com/spf13/cobra" 9 "github.com/spf13/cobra"
10) 10)
11 11
diff --git a/cmd/deploy/host/status.go b/cmd/ship/host/status.go
index bdd9c31..eb2de53 100644
--- a/cmd/deploy/host/status.go
+++ b/cmd/ship/host/status.go
@@ -3,8 +3,8 @@ package host
3import ( 3import (
4 "fmt" 4 "fmt"
5 5
6 "github.com/bdw/deploy/internal/ssh" 6 "github.com/bdw/ship/internal/ssh"
7 "github.com/bdw/deploy/internal/state" 7 "github.com/bdw/ship/internal/state"
8 "github.com/spf13/cobra" 8 "github.com/spf13/cobra"
9) 9)
10 10
diff --git a/cmd/deploy/host/update.go b/cmd/ship/host/update.go
index aa47ed8..5f838b6 100644
--- a/cmd/deploy/host/update.go
+++ b/cmd/ship/host/update.go
@@ -6,8 +6,8 @@ import (
6 "os" 6 "os"
7 "strings" 7 "strings"
8 8
9 "github.com/bdw/deploy/internal/ssh" 9 "github.com/bdw/ship/internal/ssh"
10 "github.com/bdw/deploy/internal/state" 10 "github.com/bdw/ship/internal/state"
11 "github.com/spf13/cobra" 11 "github.com/spf13/cobra"
12) 12)
13 13
diff --git a/cmd/deploy/list.go b/cmd/ship/list.go
index ab19a12..a5b8df3 100644
--- a/cmd/deploy/list.go
+++ b/cmd/ship/list.go
@@ -5,7 +5,7 @@ import (
5 "os" 5 "os"
6 "text/tabwriter" 6 "text/tabwriter"
7 7
8 "github.com/bdw/deploy/internal/state" 8 "github.com/bdw/ship/internal/state"
9 "github.com/spf13/cobra" 9 "github.com/spf13/cobra"
10) 10)
11 11
diff --git a/cmd/deploy/logs.go b/cmd/ship/logs.go
index 2b016b8..1932c18 100644
--- a/cmd/deploy/logs.go
+++ b/cmd/ship/logs.go
@@ -3,8 +3,8 @@ package main
3import ( 3import (
4 "fmt" 4 "fmt"
5 5
6 "github.com/bdw/deploy/internal/ssh" 6 "github.com/bdw/ship/internal/ssh"
7 "github.com/bdw/deploy/internal/state" 7 "github.com/bdw/ship/internal/state"
8 "github.com/spf13/cobra" 8 "github.com/spf13/cobra"
9) 9)
10 10
diff --git a/cmd/deploy/main.go b/cmd/ship/main.go
index ad61523..680ac58 100644
--- a/cmd/deploy/main.go
+++ b/cmd/ship/main.go
@@ -3,8 +3,8 @@ package main
3import ( 3import (
4 "os" 4 "os"
5 5
6 "github.com/bdw/deploy/cmd/deploy/env" 6 "github.com/bdw/ship/cmd/ship/env"
7 "github.com/bdw/deploy/cmd/deploy/host" 7 "github.com/bdw/ship/cmd/ship/host"
8 "github.com/spf13/cobra" 8 "github.com/spf13/cobra"
9) 9)
10 10
@@ -19,9 +19,9 @@ var (
19) 19)
20 20
21var rootCmd = &cobra.Command{ 21var rootCmd = &cobra.Command{
22 Use: "deploy", 22 Use: "ship",
23 Short: "Deploy Go apps and static sites to a VPS with automatic HTTPS", 23 Short: "Ship apps and static sites to a VPS with automatic HTTPS",
24 Long: `deploy - Deploy Go apps and static sites to a VPS with automatic HTTPS 24 Long: `ship - Ship apps and static sites to a VPS with automatic HTTPS
25 25
26A CLI tool for deploying applications and static sites to a VPS. 26A CLI tool for deploying applications and static sites to a VPS.
27Uses Caddy for automatic HTTPS and systemd for service management.`, 27Uses Caddy for automatic HTTPS and systemd for service management.`,
diff --git a/cmd/deploy/remove.go b/cmd/ship/remove.go
index 5a98bf3..922eb8f 100644
--- a/cmd/deploy/remove.go
+++ b/cmd/ship/remove.go
@@ -3,8 +3,8 @@ package main
3import ( 3import (
4 "fmt" 4 "fmt"
5 5
6 "github.com/bdw/deploy/internal/ssh" 6 "github.com/bdw/ship/internal/ssh"
7 "github.com/bdw/deploy/internal/state" 7 "github.com/bdw/ship/internal/state"
8 "github.com/spf13/cobra" 8 "github.com/spf13/cobra"
9) 9)
10 10
@@ -56,7 +56,7 @@ func runRemove(cmd *cobra.Command, args []string) error {
56 56
57 client.RunSudo(fmt.Sprintf("rm -f /usr/local/bin/%s", name)) 57 client.RunSudo(fmt.Sprintf("rm -f /usr/local/bin/%s", name))
58 client.RunSudo(fmt.Sprintf("rm -rf /var/lib/%s", name)) 58 client.RunSudo(fmt.Sprintf("rm -rf /var/lib/%s", name))
59 client.RunSudo(fmt.Sprintf("rm -f /etc/deploy/env/%s.env", name)) 59 client.RunSudo(fmt.Sprintf("rm -f /etc/ship/env/%s.env", name))
60 client.RunSudo(fmt.Sprintf("userdel %s", name)) 60 client.RunSudo(fmt.Sprintf("userdel %s", name))
61 } else { 61 } else {
62 fmt.Println("-> Removing files...") 62 fmt.Println("-> Removing files...")
diff --git a/cmd/deploy/restart.go b/cmd/ship/restart.go
index d1cfa86..2c74c62 100644
--- a/cmd/deploy/restart.go
+++ b/cmd/ship/restart.go
@@ -3,8 +3,8 @@ package main
3import ( 3import (
4 "fmt" 4 "fmt"
5 5
6 "github.com/bdw/deploy/internal/ssh" 6 "github.com/bdw/ship/internal/ssh"
7 "github.com/bdw/deploy/internal/state" 7 "github.com/bdw/ship/internal/state"
8 "github.com/spf13/cobra" 8 "github.com/spf13/cobra"
9) 9)
10 10
diff --git a/cmd/deploy/root.go b/cmd/ship/root.go
index adbc7c8..e5d6753 100644
--- a/cmd/deploy/root.go
+++ b/cmd/ship/root.go
@@ -8,9 +8,9 @@ import (
8 "strconv" 8 "strconv"
9 "strings" 9 "strings"
10 10
11 "github.com/bdw/deploy/internal/ssh" 11 "github.com/bdw/ship/internal/ssh"
12 "github.com/bdw/deploy/internal/state" 12 "github.com/bdw/ship/internal/state"
13 "github.com/bdw/deploy/internal/templates" 13 "github.com/bdw/ship/internal/templates"
14 "github.com/spf13/cobra" 14 "github.com/spf13/cobra"
15) 15)
16 16
@@ -181,7 +181,7 @@ func deployApp(host, domain, name, binaryPath string, portOverride int, envVars
181 } 181 }
182 182
183 fmt.Println("-> Creating environment file...") 183 fmt.Println("-> Creating environment file...")
184 envFilePath := fmt.Sprintf("/etc/deploy/env/%s.env", name) 184 envFilePath := fmt.Sprintf("/etc/ship/env/%s.env", name)
185 envContent := "" 185 envContent := ""
186 for k, v := range env { 186 for k, v := range env {
187 envContent += fmt.Sprintf("%s=%s\n", k, v) 187 envContent += fmt.Sprintf("%s=%s\n", k, v)
diff --git a/cmd/deploy/status.go b/cmd/ship/status.go
index 4bcfc68..03c548b 100644
--- a/cmd/deploy/status.go
+++ b/cmd/ship/status.go
@@ -3,8 +3,8 @@ package main
3import ( 3import (
4 "fmt" 4 "fmt"
5 5
6 "github.com/bdw/deploy/internal/ssh" 6 "github.com/bdw/ship/internal/ssh"
7 "github.com/bdw/deploy/internal/state" 7 "github.com/bdw/ship/internal/state"
8 "github.com/spf13/cobra" 8 "github.com/spf13/cobra"
9) 9)
10 10
diff --git a/cmd/deploy/templates/webui.html b/cmd/ship/templates/webui.html
index 052d599..052d599 100644
--- a/cmd/deploy/templates/webui.html
+++ b/cmd/ship/templates/webui.html
diff --git a/cmd/deploy/ui.go b/cmd/ship/ui.go
index 2ca88e0..cfaea08 100644
--- a/cmd/deploy/ui.go
+++ b/cmd/ship/ui.go
@@ -9,8 +9,8 @@ import (
9 "sort" 9 "sort"
10 "strconv" 10 "strconv"
11 11
12 "github.com/bdw/deploy/internal/state" 12 "github.com/bdw/ship/internal/state"
13 "github.com/bdw/deploy/internal/templates" 13 "github.com/bdw/ship/internal/templates"
14 "github.com/spf13/cobra" 14 "github.com/spf13/cobra"
15) 15)
16 16
@@ -136,13 +136,13 @@ func runUI(cmd *cobra.Command, args []string) error {
136 envContent += fmt.Sprintf("%s=%s\n", k, v) 136 envContent += fmt.Sprintf("%s=%s\n", k, v)
137 } 137 }
138 configs["env"] = envContent 138 configs["env"] = envContent
139 configs["envPath"] = fmt.Sprintf("/etc/deploy/env/%s.env", appName) 139 configs["envPath"] = fmt.Sprintf("/etc/ship/env/%s.env", appName)
140 } 140 }
141 141
142 if app.Type == "app" { 142 if app.Type == "app" {
143 workDir := fmt.Sprintf("/var/lib/%s", appName) 143 workDir := fmt.Sprintf("/var/lib/%s", appName)
144 binaryPath := fmt.Sprintf("/usr/local/bin/%s", appName) 144 binaryPath := fmt.Sprintf("/usr/local/bin/%s", appName)
145 envFilePath := fmt.Sprintf("/etc/deploy/env/%s.env", appName) 145 envFilePath := fmt.Sprintf("/etc/ship/env/%s.env", appName)
146 146
147 serviceContent, err := templates.SystemdService(map[string]string{ 147 serviceContent, err := templates.SystemdService(map[string]string{
148 "Name": appName, 148 "Name": appName,
diff --git a/cmd/deploy/version.go b/cmd/ship/version.go
index d2cd430..6e4314a 100644
--- a/cmd/deploy/version.go
+++ b/cmd/ship/version.go
@@ -10,7 +10,7 @@ var versionCmd = &cobra.Command{
10 Use: "version", 10 Use: "version",
11 Short: "Show version information", 11 Short: "Show version information",
12 Run: func(cmd *cobra.Command, args []string) { 12 Run: func(cmd *cobra.Command, args []string) {
13 fmt.Printf("deploy version %s\n", version) 13 fmt.Printf("ship version %s\n", version)
14 fmt.Printf(" commit: %s\n", commit) 14 fmt.Printf(" commit: %s\n", commit)
15 fmt.Printf(" built: %s\n", date) 15 fmt.Printf(" built: %s\n", date)
16 }, 16 },