diff options
| author | Clawd <ai@clawd.bot> | 2026-02-15 18:55:50 -0800 |
|---|---|---|
| committer | Clawd <ai@clawd.bot> | 2026-02-15 18:55:50 -0800 |
| commit | 14703575578221ad40547147618354503e3005ae (patch) | |
| tree | 2c6a5e6a17fed52934b3ecd160df7429af7e70c8 /cmd/ship/deploy_v2.go | |
| parent | a5edd07980009df28c3ed7f4cb49c934198ec60d (diff) | |
fix: resolve build errors with v1 code
- Rename validateName to validateNameV2 to avoid conflict
- Fix host status to print JSON directly (remove unused resp)
Builds successfully now
Diffstat (limited to 'cmd/ship/deploy_v2.go')
| -rw-r--r-- | cmd/ship/deploy_v2.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/ship/deploy_v2.go b/cmd/ship/deploy_v2.go index 16e12db..af4e3a7 100644 --- a/cmd/ship/deploy_v2.go +++ b/cmd/ship/deploy_v2.go | |||
| @@ -21,7 +21,7 @@ func deployV2(path string, opts deployV2Options) { | |||
| 21 | 21 | ||
| 22 | // Validate name if provided | 22 | // Validate name if provided |
| 23 | if opts.Name != "" { | 23 | if opts.Name != "" { |
| 24 | if err := validateName(opts.Name); err != nil { | 24 | if err := validateNameV2(opts.Name); err != nil { |
| 25 | output.PrintAndExit(err) | 25 | output.PrintAndExit(err) |
| 26 | } | 26 | } |
| 27 | } | 27 | } |
| @@ -157,8 +157,8 @@ type deployContext struct { | |||
| 157 | Opts deployV2Options | 157 | Opts deployV2Options |
| 158 | } | 158 | } |
| 159 | 159 | ||
| 160 | // validateName checks if name matches allowed pattern | 160 | // validateNameV2 checks if name matches allowed pattern |
| 161 | func validateName(name string) *output.ErrorResponse { | 161 | func validateNameV2(name string) *output.ErrorResponse { |
| 162 | // Must be lowercase alphanumeric with hyphens, 1-63 chars | 162 | // Must be lowercase alphanumeric with hyphens, 1-63 chars |
| 163 | pattern := regexp.MustCompile(`^[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$|^[a-z0-9]$`) | 163 | pattern := regexp.MustCompile(`^[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$|^[a-z0-9]$`) |
| 164 | if !pattern.MatchString(name) { | 164 | if !pattern.MatchString(name) { |
