Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/image-picker-shell-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ cleans up its uncommitted files when I/O returns. If the process exits first,
recovery or staging files can remain, as with an interrupted explicit installation.
At most one setup worker runs in a CLI process.

Homebrew installations use the same first-run setup described above. Installing,
upgrading, or uninstalling the cask does not edit shell profiles or change picker
preferences. After an eligible interactive `openai` run, open a new terminal to
load the shortcut.

To configure or remove persistent shortcuts explicitly:

```sh
Expand Down
4 changes: 4 additions & 0 deletions docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ The reviewed checksums cover Linux and macOS hosts on x86_64 and arm64. The
host architecture does not limit the Linux, macOS, and Windows release targets
configured in `.goreleaser.yml`.

The Homebrew cask installs the binary, ordinary completions, and manual without
running picker setup hooks. Homebrew users receive the existing first-run setup;
see [shell setup](image-picker-shell-setup.md) for eligibility and explicit setup.

Linux packages install one fish startup file at
`/usr/share/fish/vendor_conf.d/openai-picker.fish`. It activates at the first
prompt after user configuration, respects opt-out and custom bindings, and only
Expand Down
7 changes: 7 additions & 0 deletions scripts/release_artifacts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,9 @@ func TestGoReleaserPreservesArtifactsWithoutApplicationHooks(t *testing.T) {
t.Fatal("Homebrew cask publishing configuration was removed")
}
cask := config.HomebrewCasks[0]
if len(cask.Hooks.Pre) != 0 || len(cask.Hooks.Post) != 0 {
t.Fatal("Homebrew cask must leave picker setup to the existing first-run path")
}
if cask.Repository.Name != "homebrew-tools" || cask.Repository.Token != "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" {
t.Errorf("Homebrew repository configuration = %+v", cask.Repository)
}
Expand Down Expand Up @@ -604,5 +607,9 @@ type goReleaserConfig struct {
} `yaml:"repository"`
Completions map[string]string `yaml:"completions"`
Manpages []string `yaml:"manpages"`
Hooks struct {
Pre map[string]string `yaml:"pre"`
Post map[string]string `yaml:"post"`
} `yaml:"hooks"`
} `yaml:"homebrew_casks"`
}
Loading