🐛 Restore wiped Go tool installs in 05-custom.sh 🐛

- rootfs/root/docker/setup/05-custom.sh: restored the Go distribution
  install and pre-built tool installs (goreleaser, golangci-lint,
  staticcheck, gofumpt, gotestsum, ko, air, buf, goose) plus the
  __gh_latest/__install_tar/__install_bin helpers. Commit 3266c80323
  ("Migrate /var/lib/srv docker paths to /srv in docs") silently
  blanked this file to the empty upstream template stub while
  unrelated to its stated purpose; it stayed empty through two
  subsequent template-sync commits, so none of these binaries were
  landing in the built image. Also fixed naming convention violations
  found by script-lint: helper functions prefixed with __, globals
  prefixed with CUSTOM_, and a VERSION= assignment added to match the
  header stamp.
- AI.md: documented in Step 2 that 05-custom.sh carries app-specific
  install logic, not template boilerplate, and must be diffed before
  being blind-copied from the temp dir like other app-specific files
  in Steps 3/4 — prevents this regression from recurring on future
  template syncs.
This commit is contained in:
2026-07-27 14:44:13 -04:00
parent 4643b7cb0f
commit c0cf2117a9
2 changed files with 203 additions and 12 deletions
+13
View File
@@ -336,6 +336,19 @@ This covers: `rootfs/usr/local/bin/entrypoint.sh`, `rootfs/usr/local/bin/pkmgr`,
generates. The copy condition (`-f "$dest"`) means files not already in this repo are not
added — only existing files are updated.
**`05-custom.sh` is app-specific content, not boilerplate — never blind-copy it.** The
upstream template's `05-custom.sh` is an empty stub (the `# Main script` section has no
body); this repo's real content — the Go/tool install logic (`__gh_latest`, `__install_tar`,
`__install_bin` helpers, and the goreleaser/golangci-lint/staticcheck/gofumpt/gotestsum/
ko/air/buf/goose installs) — lives only in this repo's git history, not in the template.
Before overwriting `rootfs/root/docker/setup/05-custom.sh` from the temp dir, diff the temp
dir's version against the current repo version; if the temp dir version is materially
shorter/emptier, treat it like a Step 3/4 app-specific file: keep the existing body, and
only pull forward genuine boilerplate changes (version-stamp header, `set` line, shellcheck
disable line). This mirrors Step 3's handling of app-specific `rootfs/usr/local/bin/*`
scripts — apply the same rule to any other `0*.sh` setup script found to contain real
install logic beyond the stub.
---
## Step 3 — Update app-specific bin scripts