forked from cerc-io/laconic-wallet
Part of [laconicd testnet validator enrollment](https://www.notion.so/laconicd-testnet-validator-enrollment-6fc1d3cafcc64fef8c5ed3affa27c675) Co-authored-by: Shreerang Kale <shreerangkale@gmail.com> Co-authored-by: IshaVenikar <ishavenikar7@gmail.com> Reviewed-on: cerc-io/laconic-wallet#13
32 lines
734 B
Bash
Executable File
32 lines
734 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Default value for IS_RELEASE
|
|
IS_RELEASE=${IS_RELEASE:-false}
|
|
|
|
# Install dependencies
|
|
echo "Installing dependencies..."
|
|
yarn
|
|
|
|
# Create the necessary directory for assets
|
|
mkdir -p android/app/src/main/assets/
|
|
|
|
# Bundle the React Native application
|
|
yarn react-native bundle \
|
|
--platform android \
|
|
--dev false \
|
|
--entry-file index.js \
|
|
--bundle-output android/app/src/main/assets/index.android.bundle \
|
|
--assets-dest android/app/src/main/res
|
|
|
|
# Navigate to the android directory
|
|
cd android
|
|
|
|
# Run the Gradle build based on the IS_RELEASE flag
|
|
if [ "$IS_RELEASE" = "true" ]; then
|
|
echo "Building release version..."
|
|
./gradlew assembleRelease
|
|
else
|
|
echo "Building debug version..."
|
|
./gradlew assembleDebug
|
|
fi
|