Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/release-homebrew.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,13 @@ jobs:

- name: Test formula installation
run: |
cd homebrew-tap
brew install --build-from-source "./${FORMULA_PATH}"
# Register the local clone as a tap before installing —
# Homebrew rejects formulae that aren't referenced via a tap.
brew tap docdyhr/homebrew-tap "$(pwd)/homebrew-tap"
brew install --build-from-source docdyhr/homebrew-tap/macversiontracker
versiontracker --help
versiontracker --version
brew uninstall macversiontracker || true
brew uninstall docdyhr/homebrew-tap/macversiontracker || true
Comment on lines 75 to +83
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (bug_risk): Hardcoding the formula name here can get out of sync with FORMULA_PATH.

Previously this used "./${FORMULA_PATH}", but now the tap/name is hardcoded. If the formula name or path changes, FORMULA_PATH could be updated while this line is missed. Consider deriving the full tap/formula reference from FORMULA_PATH (or another shared variable) so there’s a single source of truth.

Suggested change
- name: Test formula installation
run: |
cd homebrew-tap
brew install --build-from-source "./${FORMULA_PATH}"
# Register the local clone as a tap before installing —
# Homebrew rejects formulae that aren't referenced via a tap.
brew tap docdyhr/homebrew-tap "$(pwd)/homebrew-tap"
brew install --build-from-source docdyhr/homebrew-tap/macversiontracker
versiontracker --help
versiontracker --version
brew uninstall macversiontracker || true
brew uninstall docdyhr/homebrew-tap/macversiontracker || true
- name: Test formula installation
run: |
# Register the local clone as a tap before installing —
# Homebrew rejects formulae that aren't referenced via a tap.
brew tap docdyhr/homebrew-tap "$(pwd)/homebrew-tap"
# Derive the tap/formula reference from FORMULA_PATH so there's a single source of truth.
formula_basename="$(basename "${FORMULA_PATH}")"
formula_name="${formula_basename%.rb}"
tap_name="docdyhr/homebrew-tap"
formula_ref="${tap_name}/${formula_name}"
brew install --build-from-source "${formula_ref}"
versiontracker --help
versiontracker --version
brew uninstall "${formula_ref}" || true


- name: Push updated formula to tap
env:
Expand Down
Loading