Skip to content

Commit 5564cd6

Browse files
committed
Fix brew test version check by committing formula to tap
The error "Testing requires the latest version" occurs because Homebrew checks if the installed version matches the tap's version. Solution: Commit the formula to the tap's git repository after copying it, so Homebrew recognizes it as the official version in the tap. Steps: 1. Create tap (brew tap-new) 2. Copy formula to tap 3. Git commit the formula to tap (NEW) 4. Install from tap 5. Test from tap (now succeeds)
1 parent 00f9d63 commit 5564cd6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/homebrew.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ jobs:
5050
echo "Copying formula to tap..."
5151
cp packaging/homebrew/mfc.rb $(brew --repository)/Library/Taps/mflowcode/homebrew-test/Formula/mfc.rb
5252
53+
echo "Committing formula to tap..."
54+
cd $(brew --repository)/Library/Taps/mflowcode/homebrew-test
55+
git add Formula/mfc.rb
56+
git commit -m "Add MFC formula"
57+
cd -
58+
5359
echo "Installing MFC from local tap..."
5460
brew install --build-from-source --verbose mflowcode/test/mfc 2>&1 | tee /tmp/brew-install.log
5561
@@ -84,7 +90,7 @@ jobs:
8490
- name: Run formula tests
8591
run: |
8692
echo "Running Homebrew formula tests..."
87-
brew test mfc
93+
brew test --verbose mflowcode/test/mfc
8894
8995
- name: Test MFC binaries
9096
run: |

0 commit comments

Comments
 (0)