Skip to content

Commit

Permalink
Update generate-apk.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Shashwat12-egov authored Dec 19, 2024
1 parent a5d768f commit 7f554b3
Showing 1 changed file with 29 additions and 27 deletions.
56 changes: 29 additions & 27 deletions tools/generate-apk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,41 @@ build_apk() {
fi
}

# Ask user for environment to build for
echo "Please select an environment to build for (UAT, DEV, QA or ALL):"
read env
env="${env:-ALL}"
# # Ask user for environment to build for
# echo "Please select an environment to build for (UAT, DEV, QA or ALL):"
# read env
# env="${env:-ALL}"

# Ask user for build config
echo "Please select a build config (release or profile):"
read build_config
build_config="${build_config:-release}"

# Build APK for specified environment(s) and build config
if [ "$env" == "ALL" ]; then
env_list=("UAT" "DEV" "QA")
else
env_list=("$env")
fi

./tools/install_bricks.sh

for env_option in "${env_list[@]}"; do
cd "$APP_DIR" || exit

case $env_option in
"UAT")
cp ".env.uat" ".env"
;;
"QA")
cp ".env.qa" ".env"
;;
"DEV")
cp ".env.dev" ".env"
;;
esac
cd "$APP_DIR" || exit

# # Build APK for specified environment(s) and build config
# if [ "$env" == "ALL" ]; then
# env_list=("UAT" "DEV" "QA")
# else
# env_list=("$env")
# fi

# ./tools/install_bricks.sh

# for env_option in "${env_list[@]}"; do
# cd "$APP_DIR" || exit

# case $env_option in
# "UAT")
# cp ".env.uat" ".env"
# ;;
# "QA")
# cp ".env.qa" ".env"
# ;;
# "DEV")
# cp ".env.dev" ".env"
# ;;
# esac

build_apk
cd ../../ || exit
Expand Down

0 comments on commit 7f554b3

Please sign in to comment.