Skip to content

Commit 174982f

Browse files
authored
Merge pull request #44 from joeliscoding/auto-update-homebrew-formula
running the update-homebrew script
2 parents 622f00b + fccdd3a commit 174982f

File tree

1 file changed

+2
-25
lines changed

1 file changed

+2
-25
lines changed

.github/workflows/update-homebrew.yml

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,6 @@ jobs:
2121
VERSION=$(grep '^version =' gitfetch/pyproject.toml | sed 's/version = "\(.*\)"/\1/')
2222
echo "version=$VERSION" >> $GITHUB_OUTPUT
2323
24-
- name: Download release tarball
25-
run: |
26-
curl -L -o release.tar.gz https://github.com/Matars/gitfetch/archive/refs/tags/v${{ steps.get_version.outputs.version }}.tar.gz
27-
28-
- name: Calculate SHA256
29-
id: sha256
30-
run: |
31-
SHA256=$(shasum -a 256 release.tar.gz | cut -d' ' -f1)
32-
echo "sha256=$SHA256" >> $GITHUB_OUTPUT
33-
3424
- name: Checkout tap repo
3525
uses: actions/checkout@v4
3626
with:
@@ -40,21 +30,8 @@ jobs:
4030

4131
- name: Update formula
4232
run: |
43-
sed -i 's|url "https://github.com/Matars/gitfetch/archive/refs/tags/v.*"|url "https://github.com/Matars/gitfetch/archive/refs/tags/v${{ steps.get_version.outputs.version }}.tar.gz"|' homebrew-tap/Formula/gitfetch.rb
44-
sed -i 's|sha256 ".*"|sha256 "${{ steps.sha256.outputs.sha256 }}"|' homebrew-tap/Formula/gitfetch.rb
45-
# Update resource SHAs
46-
CERTIFI_SHA=$(curl -s https://files.pythonhosted.org/packages/4c/5b/b6ce21586237c77ce67d01dc5507039d444b630dd76611bbca2d8e5dcd91/certifi-2025.10.5.tar.gz | shasum -a 256 | cut -d' ' -f1)
47-
CHARSET_SHA=$(curl -s https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz | shasum -a 256 | cut -d' ' -f1)
48-
IDNA_SHA=$(curl -s https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz | shasum -a 256 | cut -d' ' -f1)
49-
READCHAR_SHA=$(curl -s https://files.pythonhosted.org/packages/dd/f8/8657b8cbb4ebeabfbdf991ac40eca8a1d1bd012011bd44ad1ed10f5cb494/readchar-4.2.1.tar.gz | shasum -a 256 | cut -d' ' -f1)
50-
REQUESTS_SHA=$(curl -s https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz | shasum -a 256 | cut -d' ' -f1)
51-
URLLIB3_SHA=$(curl -s https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz | shasum -a 256 | cut -d' ' -f1)
52-
sed -i "s|sha256 \".*\" # certifi|sha256 \"$CERTIFI_SHA\"|" homebrew-tap/Formula/gitfetch.rb
53-
sed -i "s|sha256 \".*\" # charset-normalizer|sha256 \"$CHARSET_SHA\"|" homebrew-tap/Formula/gitfetch.rb
54-
sed -i "s|sha256 \".*\" # idna|sha256 \"$IDNA_SHA\"|" homebrew-tap/Formula/gitfetch.rb
55-
sed -i "s|sha256 \".*\" # readchar|sha256 \"$READCHAR_SHA\"|" homebrew-tap/Formula/gitfetch.rb
56-
sed -i "s|sha256 \".*\" # requests|sha256 \"$REQUESTS_SHA\"|" homebrew-tap/Formula/gitfetch.rb
57-
sed -i "s|sha256 \".*\" # urllib3|sha256 \"$URLLIB3_SHA\"|" homebrew-tap/Formula/gitfetch.rb
33+
chmod +x homebrew-tap/scripts/update-homebrew.sh
34+
VERSION=${{ steps.get_version.outputs.version }} ./homebrew-tap/scripts/update-homebrew.sh
5835
5936
- name: Commit and push
6037
run: |

0 commit comments

Comments
 (0)