Created
September 17, 2021 08:47
-
-
Save terrysahaidak/3f19aafce89556ec94fc50e42a93c701 to your computer and use it in GitHub Desktop.
Build script for React Native Sentry with NVM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First set the path to sentry.properties | |
export SENTRY_PROPERTIES=sentry.properties | |
# Setup nvm and set node | |
[ -z "$NVM_DIR" ] && export NVM_DIR="$HOME/.nvm" | |
if [[ -s "$HOME/.nvm/nvm.sh" ]]; then | |
. "$HOME/.nvm/nvm.sh" | |
elif [[ -x "$(command -v brew)" && -s "$(brew --prefix nvm)/nvm.sh" ]]; then | |
. "$(brew --prefix nvm)/nvm.sh" | |
fi | |
# Set up the nodenv node version manager if present | |
if [[ -x "$HOME/.nodenv/bin/nodenv" ]]; then | |
eval "$("$HOME/.nodenv/bin/nodenv" init -)" | |
fi | |
[ -z "$NODE_BINARY" ] && export NODE_BINARY="node" | |
if [ "$CONFIGURATION" = "Release" ]; then | |
$NODE_BINARY ../node_modules/@sentry/cli/bin/sentry-cli react-native xcode \ | |
../node_modules/react-native/scripts/react-native-xcode.sh | |
else | |
../node_modules/react-native/scripts/react-native-xcode.sh | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment