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
9 changes: 8 additions & 1 deletion .github/actions/universal-package/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ runs:
sed '/^[[:blank:]]*def install$/a\'$'\n ENV["CFLAGS"] = "-arch x86_64 -arch arm64"\n' | \
sed '/^[[:blank:]]*def install$/a\'$'\n ENV["LDFLAGS"] = "-arch x86_64 -arch arm64"\n' >${formula}.rb

# Homebrew requires formula files to be placed in taps and disallows
# installing from raw paths, so we manually create a taps folder for a
# 'macvim-dev/deps' tap.
FORMULA_DIR="$(brew --repository)/Library/Taps/macvim-dev/homebrew-deps/Formula/"
mkdir -p "$FORMULA_DIR"
cp ${formula}.rb "$FORMULA_DIR"

# Uninstall the already installed formula because we want to build our own
brew uninstall --ignore-dependencies ${formula} || true

Expand Down Expand Up @@ -74,7 +81,7 @@ runs:

# This will be a no-op if formula was cached. We check if the package
# exists first just to avoid an "already installed" warning.
brew list ${formula} &>/dev/null || brew install --quiet --formula -s ./${formula}.rb
brew list ${formula} &>/dev/null || brew install --quiet --formula -s macvim-dev/deps/${formula}

# If formula was cached, this step is necessary to relink it to brew prefix (e.g. /usr/local)
brew unlink ${formula} && brew link ${formula}
Expand Down
Loading