fix: keep experimental commands visible in nightly builds · Entire
fix: keep experimental commands visible in nightly builds
4b358a8→main·
gtrrz-victor·3d ago·2 files·+25 added/-13 removed
Stable and nightly share .goreleaser.yaml, differing only by tag. A hardcoded Visible=false hid experimental commands in nightly too. Key the ldflags stamp off .Prerelease so only stable (empty prerelease) hides them; nightly (vX.Y.Z-nightly.*) keeps them visible, matching local builds.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
Sessions
01KXG2ZAXZJTDFSS4Z77SFY0Z9View transcript
[?
Cobra CLI Command Grouping and GatingClaude Code·1 step](/content/gh/entireio/cli/session/ad57b47f-bbe3-4801-879d-635952769b85#timeline-01KXG2ZAXZJTDFSS4Z77SFY0Z9/index.html)
Changes
2
M.goreleaser.yaml+5/-2
docs/superpowers/specs
M2026-07-10-experimental-command-gating-design.md+20/-11
25 unmodified lines
26
27
28
29
30
29
30
31
32
33
34
35
36
25 unmodified lines
- -X github.com/entireio/cli/cmd/entire/cli/versioninfo.Commit={{.ShortCommit}}
- -X github.com/entireio/cli/cmd/entire/cli/telemetry.PostHogAPIKey={{.Env.POSTHOG_API_KEY}}
- -X github.com/entireio/cli/cmd/entire/cli/telemetry.PostHogEndpoint={{.Env.POSTHOG_ENDPOINT}}
# Hide experimental commands from help in shipped release binaries.
- -X github.com/entireio/cli/cmd/entire/cli/experimental.Visible=false
# Experimental-command visibility: hide in stable releases, keep visible
# in nightly (prerelease) builds. .Prerelease is empty for a stable tag
# (vX.Y.Z) and non-empty for a nightly tag (vX.Y.Z-nightly.*). Local
# builds carry no stamp and use the package default ("true" = visible).
- -X github.com/entireio/cli/cmd/entire/cli/experimental.Visible={{ if .Prerelease }}true{{ else }}false{{ end }}
# git-remote-entire is the git remote helper for entire:// URLs (see
# cmd/git-remote-entire). A small, dedicated binary shipped alongside
M.goreleaser.yaml+5/-2
120 unmodified lines
121
122
123
124
125
126
127
128
129
130
131
132
133
134
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
120 unmodified lines
### Build gating
- Dev — `go build ./cmd/entire`, `go run`, mise: no ldflags → `Visible="true"`
→ experimental visible and grouped.
- Release — both GoReleaser configs, `entire` binary only (not
`git-remote-entire`), add to the `ldflags` list:
```
-X github.com/entireio/cli/cmd/entire/cli/experimental.Visible=false
```
- `.goreleaser.yaml` (prod `entire` build) — stamped.
- `.goreleaser.nonprod.yaml` — **not stamped**: it builds only the
`git-remote-entire` helper, never the `entire` binary, so there is nothing
to gate there. (The earlier "hide in nonprod too" decision is moot.)
Stable releases and nightly builds run through the **same** `.goreleaser.yaml`
(via `release.yml`); they differ only by git tag — stable is `vX.Y.Z`, nightly
is `vX.Y.Z-nightly.*` (a prerelease). Local builds carry no ldflags at all.
| Build | Tag | `.Prerelease` | Stamp | Result |
|-------|-----|---------------|-------|--------|
| Local (`go build`/`go run`/mise) | — | — | none (default) | visible |
| Nightly | `vX.Y.Z-nightly.*` | non-empty | `Visible=true` | visible |
| Stable | `vX.Y.Z` | empty | `Visible=false` | hidden |
The `entire` build's `ldflags` in `.goreleaser.yaml` gets a GoReleaser template
that keys off `.Prerelease`:
```
-X github.com/entireio/cli/cmd/entire/cli/experimental.Visible={{ if .Prerelease }}true{{ else }}false{{ end }}
```
`.goreleaser.nonprod.yaml` is **not** stamped: it builds only the
`git-remote-entire` helper, never the `entire` binary, so there is nothing to
gate there.
### mise convenience task
```