-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add ARM support to Homebrew formula
This commit updates the Homebrew formula to support both x86_64 and ARM architectures. It also includes the necessary changes to calculate SHA256 checksums for both architectures and update the formula accordingly.
- Loading branch information
Showing
5 changed files
with
36 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -291,37 +291,61 @@ jobs: | |
with: | ||
pattern: binaries-macos-* | ||
path: dist/ | ||
merge-multiple: true | ||
|
||
- name: Calculate SHA256 | ||
id: sha-calc | ||
run: | | ||
SHA=$(sha256sum dist/aicommit-macos-x86_64 | awk '{ print $1 }') | ||
echo "sha256=$SHA" >> $GITHUB_OUTPUT | ||
echo "sha256_x86=$(sha256sum dist/aicommit-macos-x86_64 | awk '{ print $1 }')" >> $GITHUB_OUTPUT | ||
echo "sha256_arm=$(sha256sum dist/aicommit-macos-aarch64 | awk '{ print $1 }')" >> $GITHUB_OUTPUT | ||
- name: Update formula | ||
env: | ||
VERSION: ${{ github.ref_name }} | ||
SHA256: ${{ steps.sha-calc.outputs.sha256 }} | ||
SHA256_X86: ${{ steps.sha-calc.outputs.sha256_x86 }} | ||
SHA256_ARM: ${{ steps.sha-calc.outputs.sha256_arm }} | ||
run: | | ||
cat > homebrew-tap/Formula/aicommit.rb <<EOL | ||
class Aicommit < Formula | ||
desc "AI-powered commit message generator" | ||
homepage "https://github.com/suenot/aicommit" | ||
url "https://github.com/suenot/aicommit/releases/download/${VERSION}/aicommit-macos-x86_64" | ||
sha256 "${SHA256}" | ||
version "${VERSION}" | ||
license "MIT" | ||
def install | ||
bin.install "aicommit-macos-x86_64" => "aicommit" | ||
on_macos do | ||
on_arm do | ||
url "https://github.com/suenot/aicommit/releases/download/${VERSION}/aicommit-macos-aarch64" | ||
sha256 "${SHA256_ARM}" | ||
def install | ||
bin.install "aicommit-macos-aarch64" => "aicommit" | ||
end | ||
end | ||
on_intel do | ||
url "https://github.com/suenot/aicommit/releases/download/${VERSION}/aicommit-macos-x86_64" | ||
sha256 "${SHA256_X86}" | ||
def install | ||
bin.install "aicommit-macos-x86_64" => "aicommit" | ||
end | ||
end | ||
end | ||
end | ||
EOL | ||
- name: Debug formula | ||
run: | | ||
echo "Generated formula:" | ||
cat homebrew-tap/Formula/aicommit.rb | ||
echo "Files in dist:" | ||
ls -la dist/ | ||
- name: Commit and push | ||
run: | | ||
cd homebrew-tap | ||
git config user.name "GitHub Actions" | ||
git config user.email "[email protected]" | ||
git add Formula/aicommit.rb | ||
git commit -m "Update aicommit to ${{ github.ref_name }}" | ||
git commit -m "Update aicommit to ${{ github.ref_name }} with ARM support" | ||
git push |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "aicommit" | ||
version = "0.1.105" | ||
version = "0.1.106" | ||
edition = "2021" | ||
authors = ["Eugen Soloviov <[email protected]>"] | ||
description = "A CLI tool that generates concise and descriptive git commit messages using LLMs" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,5 +46,5 @@ | |
"postinstall": "chmod +x index.js", | ||
"start": "node index.js" | ||
}, | ||
"version": "0.1.105" | ||
"version": "0.1.106" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.1.105 | ||
0.1.106 |