forked from invertase/react-native-firebase
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-homebrew-rnfb.sh
More file actions
executable file
·31 lines (26 loc) · 984 Bytes
/
Copy pathinstall-homebrew-rnfb.sh
File metadata and controls
executable file
·31 lines (26 loc) · 984 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env bash
# Install vendored RNFB Homebrew formulae (Brew 6+ requires a tap, not bare --formula paths).
# Pin/update docs: okf-bundle/ci-workflows/ios.md#pinned-homebrew-utilities
set -euo pipefail
if [[ $# -lt 1 ]]; then
echo "usage: $0 <formula> [<formula> ...]" >&2
exit 1
fi
TAP_ROOT="$(brew --repository)/Library/Taps/invertase/homebrew-rnfb"
mkdir -p "$TAP_ROOT"
cp -R .github/homebrew-rnfb/Formula "$TAP_ROOT/"
export HOMEBREW_NO_AUTO_UPDATE=1
brew trust invertase/rnfb
# GHA images often ship homebrew-core formulae with the same names. Brew refuses to
# install invertase/rnfb/<name> while core <name> is still in the Cellar.
for formula in "$@"; do
if brew list --formula "$formula" &>/dev/null; then
echo "Uninstalling existing ${formula} before invertase/rnfb install..."
brew uninstall --formula "$formula"
fi
done
install_args=()
for formula in "$@"; do
install_args+=("invertase/rnfb/${formula}")
done
brew install "${install_args[@]}"