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
11 changes: 7 additions & 4 deletions .github/workflows/publish-homebrew.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
app-id: ${{ secrets.HOTDATA_AUTOMATION_APP_ID }}
private-key: ${{ secrets.HOTDATA_AUTOMATION_PRIVATE_KEY }}
owner: hotdata-dev
repositories: homebrew-tap
repositories: homebrew-tap,hotdata-cli

- uses: actions/checkout@v6
with:
Expand Down Expand Up @@ -50,9 +50,12 @@ jobs:
brew update
brew style --except-cops FormulaAudit/Homepage,FormulaAudit/Desc,FormulaAuditStrict --fix "Formula/${filename}" || true

# Add shell completions generation if not already present
# Add shell completions generation after the last bin.install line
if ! grep -q 'generate_completions_from_executable' "Formula/${filename}"; then
sed -i '/bin\.install "hotdata"/a\ generate_completions_from_executable(bin/"hotdata", "completions")' "Formula/${filename}"
last_bin_install=$(grep -n 'bin\.install' "Formula/${filename}" | tail -1 | cut -d: -f1)
if [ -n "$last_bin_install" ]; then
sed -i "${last_bin_install}a\\ generate_completions_from_executable(bin/\"hotdata\", \"completions\")" "Formula/${filename}"
fi
fi

git add "Formula/${filename}"
Expand All @@ -62,7 +65,7 @@ jobs:

- name: Remove .rb from GitHub Release assets
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
TAG=$(echo "$PLAN" | jq -r '.announcement_tag')
if [ -z "$TAG" ] || [ "$TAG" = "null" ]; then
Expand Down
2 changes: 1 addition & 1 deletion scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ case "$COMMAND" in

echo ""
echo "→ Running cargo release (tagging release)..."
cargo release
cargo release --execute

echo ""
echo "✓ Release complete. Tag pushed and dist workflow triggered."
Expand Down
Loading