diff --git a/.github/workflows/update-homebrew.yml b/.github/workflows/update-homebrew.yml index 43f9ab2..50920b3 100644 --- a/.github/workflows/update-homebrew.yml +++ b/.github/workflows/update-homebrew.yml @@ -21,16 +21,6 @@ jobs: VERSION=$(grep '^version =' gitfetch/pyproject.toml | sed 's/version = "\(.*\)"/\1/') echo "version=$VERSION" >> $GITHUB_OUTPUT - - name: Download release tarball - run: | - curl -L -o release.tar.gz https://github.com/Matars/gitfetch/archive/refs/tags/v${{ steps.get_version.outputs.version }}.tar.gz - - - name: Calculate SHA256 - id: sha256 - run: | - SHA256=$(shasum -a 256 release.tar.gz | cut -d' ' -f1) - echo "sha256=$SHA256" >> $GITHUB_OUTPUT - - name: Checkout tap repo uses: actions/checkout@v4 with: @@ -40,21 +30,8 @@ jobs: - name: Update formula run: | - 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 - sed -i 's|sha256 ".*"|sha256 "${{ steps.sha256.outputs.sha256 }}"|' homebrew-tap/Formula/gitfetch.rb - # Update resource SHAs - CERTIFI_SHA=$(curl -s https://files.pythonhosted.org/packages/4c/5b/b6ce21586237c77ce67d01dc5507039d444b630dd76611bbca2d8e5dcd91/certifi-2025.10.5.tar.gz | shasum -a 256 | cut -d' ' -f1) - 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) - IDNA_SHA=$(curl -s https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz | shasum -a 256 | cut -d' ' -f1) - READCHAR_SHA=$(curl -s https://files.pythonhosted.org/packages/dd/f8/8657b8cbb4ebeabfbdf991ac40eca8a1d1bd012011bd44ad1ed10f5cb494/readchar-4.2.1.tar.gz | shasum -a 256 | cut -d' ' -f1) - REQUESTS_SHA=$(curl -s https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz | shasum -a 256 | cut -d' ' -f1) - URLLIB3_SHA=$(curl -s https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz | shasum -a 256 | cut -d' ' -f1) - sed -i "s|sha256 \".*\" # certifi|sha256 \"$CERTIFI_SHA\"|" homebrew-tap/Formula/gitfetch.rb - sed -i "s|sha256 \".*\" # charset-normalizer|sha256 \"$CHARSET_SHA\"|" homebrew-tap/Formula/gitfetch.rb - sed -i "s|sha256 \".*\" # idna|sha256 \"$IDNA_SHA\"|" homebrew-tap/Formula/gitfetch.rb - sed -i "s|sha256 \".*\" # readchar|sha256 \"$READCHAR_SHA\"|" homebrew-tap/Formula/gitfetch.rb - sed -i "s|sha256 \".*\" # requests|sha256 \"$REQUESTS_SHA\"|" homebrew-tap/Formula/gitfetch.rb - sed -i "s|sha256 \".*\" # urllib3|sha256 \"$URLLIB3_SHA\"|" homebrew-tap/Formula/gitfetch.rb + chmod +x homebrew-tap/scripts/update-homebrew.sh + VERSION=${{ steps.get_version.outputs.version }} ./homebrew-tap/scripts/update-homebrew.sh - name: Commit and push run: |