Skip to content

Commit 440aff2

Browse files
committed
chore: use this repo as homebrew tap (Formula/ at root)
1 parent ba19564 commit 440aff2

4 files changed

Lines changed: 17 additions & 17 deletions

File tree

.github/workflows/release.yml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,18 @@ jobs:
5353
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
5454
run: cargo publish --no-verify
5555

56-
# 3. Update Homebrew tap with new SHAs.
56+
# 3. Update Homebrew formula in this repo (it doubles as the tap).
5757
homebrew:
5858
runs-on: ubuntu-latest
5959
needs: build
60+
permissions:
61+
contents: write
6062
steps:
63+
- uses: actions/checkout@v4
64+
with:
65+
ref: main
66+
token: ${{ secrets.GITHUB_TOKEN }}
67+
6168
- name: Resolve tag
6269
id: tag
6370
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
@@ -73,22 +80,15 @@ jobs:
7380
echo "${t}=${sha}" >> "$GITHUB_OUTPUT"
7481
done
7582
76-
- name: Checkout tap repo
77-
uses: actions/checkout@v4
78-
with:
79-
repository: dudegladiator/homebrew-tap
80-
token: ${{ secrets.TAP_REPO_TOKEN }}
81-
path: tap
82-
8383
- name: Write formula
8484
env:
8585
VERSION: ${{ steps.tag.outputs.version }}
8686
SHA_ARM: ${{ steps.sha.outputs.aarch64-apple-darwin }}
8787
SHA_INTEL: ${{ steps.sha.outputs.x86_64-apple-darwin }}
8888
SHA_LINUX: ${{ steps.sha.outputs.x86_64-unknown-linux-gnu }}
8989
run: |
90-
mkdir -p tap/Formula
91-
cat > tap/Formula/cc-session.rb <<EOF
90+
mkdir -p Formula
91+
cat > Formula/cc-session.rb <<EOF
9292
class CcSession < Formula
9393
desc "Interactive TUI editor for Claude Code session JSONL files"
9494
homepage "https://github.com/dudegladiator/claude-code-session-editor"
@@ -121,8 +121,7 @@ jobs:
121121
end
122122
EOF
123123
124-
- name: Commit + push tap
125-
working-directory: tap
124+
- name: Commit + push formula
126125
env:
127126
VERSION: ${{ steps.tag.outputs.version }}
128127
run: |
@@ -133,5 +132,5 @@ jobs:
133132
echo "no formula changes"
134133
exit 0
135134
fi
136-
git commit -m "cc-session ${VERSION}"
137-
git push
135+
git commit -m "chore: update Homebrew formula for v${VERSION}"
136+
git push origin HEAD:main

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,11 @@ cargo install cc-session
3939
**Homebrew:**
4040

4141
```sh
42-
brew tap dudegladiator/tap
43-
brew install cc-session
42+
brew install dudegladiator/claude-code-session-editor/cc-session
4443
```
4544

45+
(This repo doubles as the tap — `Formula/cc-session.rb` lives at the root.)
46+
4647
## Usage
4748

4849
```sh

site/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ <h2>Install</h2>
2626

2727
<h2>Other paths</h2>
2828
<pre>cargo install cc-session
29-
brew tap dudegladiator/tap &amp;&amp; brew install cc-session</pre>
29+
brew install dudegladiator/claude-code-session-editor/cc-session</pre>
3030

3131
<h2>Docs</h2>
3232
<p><a href="https://github.com/dudegladiator/claude-code-session-editor">github.com/dudegladiator/claude-code-session-editor</a></p>

0 commit comments

Comments
 (0)