From 8f1e7fec2ff7ab52cc85d8acce978d27f048103b Mon Sep 17 00:00:00 2001 From: HudaHajira Date: Thu, 14 May 2026 15:31:09 -0500 Subject: [PATCH] ci: support initial homebrew formula placeholders --- .github/workflows/homebrew-bump.yml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/homebrew-bump.yml b/.github/workflows/homebrew-bump.yml index 58ca750..6afc25d 100644 --- a/.github/workflows/homebrew-bump.yml +++ b/.github/workflows/homebrew-bump.yml @@ -50,14 +50,21 @@ jobs: - name: Update formula run: | - VERSION="${{ steps.version.outputs.version }}" - FORMULA="homebrew-floci/Formula/floci.rb" - sed -i "s/version \".*\"/version \"${VERSION}\"/" "$FORMULA" - sed -i "/darwin-amd64/ { n; s/sha256 \".*\"/sha256 \"${{ steps.sha.outputs.darwin_amd64 }}\"/ }" "$FORMULA" - sed -i "/darwin-arm64/ { n; s/sha256 \".*\"/sha256 \"${{ steps.sha.outputs.darwin_arm64 }}\"/ }" "$FORMULA" - sed -i "/linux-amd64/ { n; s/sha256 \".*\"/sha256 \"${{ steps.sha.outputs.linux_amd64 }}\"/ }" "$FORMULA" - sed -i "/linux-arm64/ { n; s/sha256 \".*\"/sha256 \"${{ steps.sha.outputs.linux_arm64 }}\"/ }" "$FORMULA" + VERSION="${{ steps.version.outputs.version }}" + FORMULA="homebrew-floci/Formula/floci.rb" + sed -i "s/version \".*\"/version \"${VERSION}\"/" "$FORMULA" + sed -i "s/{{VERSION}}/${VERSION}/g" "$FORMULA" + sed -i "s/{{SHA256_DARWIN_AMD64}}/${{ steps.sha.outputs.darwin_amd64 }}/g" "$FORMULA" + sed -i "s/{{SHA256_DARWIN_ARM64}}/${{ steps.sha.outputs.darwin_arm64 }}/g" "$FORMULA" + sed -i "s/{{SHA256_LINUX_AMD64}}/${{ steps.sha.outputs.linux_amd64 }}/g" "$FORMULA" + sed -i "s/{{SHA256_LINUX_ARM64}}/${{ steps.sha.outputs.linux_arm64 }}/g" "$FORMULA" + + sed -i "/darwin-amd64/ { n; s/sha256 \".*\"/sha256 \"${{ steps.sha.outputs.darwin_amd64 }}\"/ }" "$FORMULA" + sed -i "/darwin-arm64/ { n; s/sha256 \".*\"/sha256 \"${{ steps.sha.outputs.darwin_arm64 }}\"/ }" "$FORMULA" + sed -i "/linux-amd64/ { n; s/sha256 \".*\"/sha256 \"${{ steps.sha.outputs.linux_amd64 }}\"/ }" "$FORMULA" + sed -i "/linux-arm64/ { n; s/sha256 \".*\"/sha256 \"${{ steps.sha.outputs.linux_arm64 }}\"/ }" "$FORMULA" + - name: Open PR uses: peter-evans/create-pull-request@v7 with: