Skip to content

Commit 4113d5f

Browse files
milispclaude
andcommitted
fix: add Intel SHA extraction and update to homebrew tap script
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 1597ba4 commit 4113d5f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/update-homebrew-tap.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,18 @@ VERSION=$(jq -r '.tag_name' release.json | sed 's/^v//')
2323
# Extract SHAs from release.json
2424
# The digest field format is "sha256:..." so we cut the prefix
2525
ARM_SHA=$(jq -r '.assets[] | select(.name | contains("aarch64") and endswith(".dmg")) | .digest' release.json | cut -d: -f2)
26+
INTEL_SHA=$(jq -r '.assets[] | select(.name | contains("x86_64") and endswith(".dmg")) | .digest' release.json | cut -d: -f2)
2627

27-
if [ -z "$ARM_SHA" ]; then
28+
if [ -z "$ARM_SHA" ] || [ -z "$INTEL_SHA" ]; then
2829
echo "Error: Could not extract SHAs from release.json"
2930
echo "ARM SHA: $ARM_SHA"
31+
echo "Intel SHA: $INTEL_SHA"
3032
exit 1
3133
fi
3234

3335
echo "Updating to version $VERSION"
3436
echo "ARM SHA256: $ARM_SHA"
37+
echo "Intel SHA256: $INTEL_SHA"
3538

3639
# Clone the Homebrew tap repository
3740
git clone https://x-access-token:${GITHUB_TOKEN}@github.com/milisp/homebrew-codexia.git
@@ -49,6 +52,7 @@ fi
4952
# Note: Using Linux-compatible sed syntax (without empty string after -i)
5053
sed -i "s/version \".*\"/version \"${VERSION}\"/" "$TARGET_FILE"
5154
sed -i "/on_arm do/,/end/ s/sha256 \".*\"/sha256 \"${ARM_SHA}\"/" "$TARGET_FILE"
55+
sed -i "/on_intel do/,/end/ s/sha256 \".*\"/sha256 \"${INTEL_SHA}\"/" "$TARGET_FILE"
5256

5357
# Commit and push changes
5458
git config user.name "github-actions[bot]"

0 commit comments

Comments
 (0)