From 23128dbe3c73b94f2daa787f0de913f46fbcc688 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Wed, 1 Mar 2023 05:40:52 +0200 Subject: [PATCH] Separate test build apk from overriding the original app --- .github/workflows/pr_test_build.yml | 3 +-- scripts/android/app_env.sh | 12 +++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr_test_build.yml b/.github/workflows/pr_test_build.yml index 0be2a5e68..759aa218d 100644 --- a/.github/workflows/pr_test_build.yml +++ b/.github/workflows/pr_test_build.yml @@ -35,8 +35,7 @@ jobs: git clone https://github.com/cake-tech/cake_wallet.git --branch $GITHUB_HEAD_REF cd cake_wallet/scripts/android/ ./install_ndk.sh - source ./app_env.sh cakewallet - export APP_ANDROID_PACKAGE="com.cakewallet.cake_wallet.test" + source ./app_env.sh cakewallet.test ./app_config.sh - name: Cache Externals diff --git a/scripts/android/app_env.sh b/scripts/android/app_env.sh index eabd192ce..26b5a399b 100644 --- a/scripts/android/app_env.sh +++ b/scripts/android/app_env.sh @@ -9,8 +9,9 @@ APP_ANDROID_PACKAGE="" MONERO_COM="monero.com" CAKEWALLET="cakewallet" HAVEN="haven" +CAKEWALLET_TEST="cakewallet.test" -TYPES=($MONERO_COM $CAKEWALLET $HAVEN) +TYPES=($MONERO_COM $CAKEWALLET $HAVEN $CAKEWALLET_TEST) APP_ANDROID_TYPE=$1 MONERO_COM_NAME="Monero.com" @@ -31,6 +32,8 @@ HAVEN_BUILD_NUMBER=1 HAVEN_BUNDLE_ID="com.cakewallet.haven" HAVEN_PACKAGE="com.cakewallet.haven" +CAKEWALLET_TEST_PACKAGE="com.cakewallet.cake_wallet.test" + if ! [[ " ${TYPES[*]} " =~ " ${APP_ANDROID_TYPE} " ]]; then echo "Wrong app type." return 1 2>/dev/null @@ -59,6 +62,13 @@ case $APP_ANDROID_TYPE in APP_ANDROID_BUNDLE_ID=$HAVEN_BUNDLE_ID APP_ANDROID_PACKAGE=$HAVEN_PACKAGE ;; + $CAKEWALLET_TEST) + APP_ANDROID_NAME=$CAKEWALLET_NAME + APP_ANDROID_VERSION=$CAKEWALLET_VERSION + APP_ANDROID_BUILD_NUMBER=$CAKEWALLET_BUILD_NUMBER + APP_ANDROID_BUNDLE_ID=$CAKEWALLET_BUNDLE_ID + APP_ANDROID_PACKAGE=CAKEWALLET_TEST_PACKAGE + ;; esac export APP_ANDROID_TYPE