#!/bin/bash -e
# uploadMissedSentryMapping.sh
#
# Upload missed Sentry mapping

bundlePath="bundle"
if [ ! -z "$BUNDLE_PATH" ]
then
    bundlePath=$BUNDLE_PATH
fi

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

NODE_MODULES_BIN="$(pwd)/node_modules/.bin"
export PATH=$NODE_MODULES_BIN:$PATH

export BUNDLE_VERSION_NAME=$(./scripts/bundleVersion.sh)

yarn clean
yarn reset
yarn setup
yarn install
eval "$bundlePath exec fastlane upload_missed_sentry_mapping"