diff options
| author | bndw <ben@bdw.to> | 2026-02-10 21:29:20 -0800 |
|---|---|---|
| committer | bndw <ben@bdw.to> | 2026-02-10 21:29:20 -0800 |
| commit | c49a067ac84ac5c1691ecf4db6a9bf791246899f (patch) | |
| tree | efbb94c0d5a79411e91089922151f1ad424e6645 /cmd/ship/list.go | |
| parent | 47d4b3b6e4d68660e6e1e05fe2e1c0839f86e40e (diff) | |
Remove --module flag, add --public, make hooks smarter
Drop git-module type — the post-receive hook now checks for a Dockerfile
before building, so repos without one simply skip deploy on push. This
covers Go modules and libraries that only need vanity imports.
Add --public flag to ship init for per-repo HTTPS clone visibility.
Show visibility column in ship list.
Diffstat (limited to 'cmd/ship/list.go')
| -rw-r--r-- | cmd/ship/list.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/cmd/ship/list.go b/cmd/ship/list.go index a10b2ca..af5baf8 100644 --- a/cmd/ship/list.go +++ b/cmd/ship/list.go | |||
| @@ -37,7 +37,7 @@ func runList(cmd *cobra.Command, args []string) error { | |||
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | w := tabwriter.NewWriter(os.Stdout, 0, 0, 3, ' ', 0) | 39 | w := tabwriter.NewWriter(os.Stdout, 0, 0, 3, ' ', 0) |
| 40 | fmt.Fprintln(w, "NAME\tTYPE\tDOMAIN\tPORT") | 40 | fmt.Fprintln(w, "NAME\tTYPE\tVISIBILITY\tDOMAIN\tPORT") |
| 41 | for name, app := range apps { | 41 | for name, app := range apps { |
| 42 | port := "" | 42 | port := "" |
| 43 | if app.Type == "app" || app.Type == "git-app" { | 43 | if app.Type == "app" || app.Type == "git-app" { |
| @@ -47,7 +47,14 @@ func runList(cmd *cobra.Command, args []string) error { | |||
| 47 | if domain == "" { | 47 | if domain == "" { |
| 48 | domain = "-" | 48 | domain = "-" |
| 49 | } | 49 | } |
| 50 | fmt.Fprintf(w, "%s\t%s\t%s\t%s\n", name, app.Type, domain, port) | 50 | visibility := "" |
| 51 | if app.Repo != "" { | ||
| 52 | visibility = "private" | ||
| 53 | if app.Public { | ||
| 54 | visibility = "public" | ||
| 55 | } | ||
| 56 | } | ||
| 57 | fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\n", name, app.Type, visibility, domain, port) | ||
| 51 | } | 58 | } |
| 52 | w.Flush() | 59 | w.Flush() |
| 53 | return nil | 60 | return nil |
