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
7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Optional. Without it the release still publishes and the Homebrew
# cask is skipped — see the skip_upload guard in .goreleaser.yaml.
# Needs a PAT with write access to dsaad68/homebrew-tap.
HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
# The Homebrew cask is commented out in .goreleaser.yaml until the tap
# has a write token. Restore this line alongside it:
# HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
61 changes: 31 additions & 30 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,39 +47,40 @@ changelog:
- '^chore:'
- Merge pull request

# A cask, not a formula: goreleaser deprecated `brews`, and a cask also strips
# the macOS quarantine attribute from the downloaded binary. `brew install
# --cask` is macOS-only, which is where Kaku runs; Linux users have `go install`
# and the tarballs above.
homebrew_casks:
- name: kaku-tab
binaries: [kaku-tab]
repository:
owner: dsaad68
name: homebrew-tap
token: '{{ .Env.HOMEBREW_TAP_TOKEN }}'
# Publishing needs the tap repo and a token with write access to it. Until
# both exist the release still succeeds and simply skips the cask, rather
# than failing after the archives are already uploaded.
skip_upload: '{{ if index .Env "HOMEBREW_TAP_TOKEN" }}false{{ else }}true{{ end }}'
homepage: https://github.com/dsaad68/kaku-tab
description: A tmux plugin that maps one tmux window to one terminal tab
caveats: |
This installs the binary only. tmux still needs the plugin entry point,
from TPM:

set -g @plugin 'dsaad68/kaku-tab'

or from a checkout:

run-shell '~/.tmux/plugins/kaku-tab/kaku-tab.tmux'

Either way it finds kaku-tab on PATH, so no build step runs.
# Homebrew is off until the tap has a write token. The block below is kept
# rather than deleted: re-enabling it is uncommenting this, adding
# HOMEBREW_TAP_TOKEN as a repo secret, and restoring the env line in
# .github/workflows/release.yml. A cask, not a formula — goreleaser deprecated
# `brews`, and a cask also strips the macOS quarantine attribute from the
# downloaded binary. `brew install --cask` is macOS-only, which is where Kaku
# runs; Linux users have `go install` and the tarballs above.
#
# homebrew_casks:
# - name: kaku-tab
# binaries: [kaku-tab]
# repository:
# owner: dsaad68
# name: homebrew-tap
# token: '{{ .Env.HOMEBREW_TAP_TOKEN }}'
# homepage: https://github.com/dsaad68/kaku-tab
# description: A tmux plugin that maps one tmux window to one terminal tab
# caveats: |
# This installs the binary only. tmux still needs the plugin entry point,
# from TPM:
#
# set -g @plugin 'dsaad68/kaku-tab'
#
# or from a checkout:
#
# run-shell '~/.tmux/plugins/kaku-tab/kaku-tab.tmux'
#
# Either way it finds kaku-tab on PATH, so no build step runs.

release:
draft: false
prerelease: auto
footer: |
---
Installing: `brew install dsaad68/tap/kaku-tab`, or unpack the archive for
your platform and put `kaku-tab` on your PATH.
Installing: unpack the archive for your platform and put `kaku-tab` on your
PATH, or `go install github.com/dsaad68/kaku-tab/cmd/kaku-tab@latest`. tmux
still needs the plugin entry point — see the README.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,24 @@ set -g @plugin 'dsaad68/kaku-tab'
Then <kbd>prefix</kbd>+<kbd>I</kbd>. The plugin builds its binary on first load
if Go is available.

### Homebrew
### Prebuilt binary

Grab the archive for your platform from the [releases
page](https://github.com/dsaad68/kaku-tab/releases), unpack it, and put
`kaku-tab` on your `PATH`:

```sh
brew install --cask dsaad68/tap/kaku-tab
tar xzf kaku-tab_<version>_darwin_arm64.tar.gz
install kaku-tab /usr/local/bin/
```

That installs the binary only; tmux still needs the plugin entry point, so pair
it with the TPM line above or a checkout. Nothing gets built — the plugin finds
`kaku-tab` on `PATH`.

The binary is not notarized, so macOS quarantines it on first run. Clear the
attribute with `xattr -d com.apple.quarantine /usr/local/bin/kaku-tab`.

### Manual

```sh
Expand Down
Loading