Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- # Creates the .env-file required for build.
- # These variables are defined in the branch build configuration
- echo "API_URL=$API_URL" >> .env.production
- echo "ACCOUNT=$ACCOUNT" >> .env.production
- echo "SUPPORT_URL=$SUPPORT_URL" >> .env.production
- echo "READ_INVOICES=$READ_INVOICES" >> .env.production
- echo "PICTURE_URL=$PICTURE_URL" >> .env.production
- if [ "$APPCENTER_ANDROID_VARIANT" == "release" ];
- then
- # Reverts the Android NDK version to r16b from r17 to resolve a react native compile issue:
- # https://github.com/facebook/react-native/issues/19321
- # https://github.com/android-ndk/ndk/issues/700
- echo "Hotfix for Android: Change Android NDK Version to r16"
- set -ex
- # set env vars
- export ANDROID_NDK_VERSION='r16b'
- # create a temp working directory
- mkdir ./android-ndk-tmp
- cd ./android-ndk-tmp
- # download ndk
- wget -q https://dl.google.com/android/repository/android-ndk-$ANDROID_NDK_VERSION-darwin-x86_64.zip
- # uncompress
- unzip -o android-ndk-$ANDROID_NDK_VERSION-darwin-x86_64.zip
- # move to its final location
- mv ./android-ndk-$ANDROID_NDK_VERSION $ANDROID_HOME/ndk-bundle
- # remove temp dir
- cd ..
- rm -rf ./android-ndk-tmp
- # add to PATH
- export PATH=${PATH}:$ANDROID_HOME/ndk-bundle
- else
- echo "This should be an iOS-build"
- fi
- # TODO: Remove this line if it works without it
- # source npm run ios:build
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement