cake_wallet/scripts/android/inject_app_details.sh
OmarHatem 83cfc7dd70
Some checks are pending
Cache Dependencies / test (push) Waiting to run
fix building with haven
2024-11-25 21:05:36 +02:00

15 lines
818 B
Bash
Executable file

#!/bin/bash
source "$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/universal_sed.sh"
if [ -z "$APP_ANDROID_TYPE" ]; then
echo "Please set APP_ANDROID_TYPE"
exit 1
fi
cd ../..
set -x
universal_sed "1,/version:/ {s/version:.*/version: ${APP_ANDROID_VERSION}+${APP_ANDROID_BUILD_NUMBER}/;}" ./pubspec.yaml
universal_sed "1,/version:/ {s/__APP_PACKAGE__/${APP_ANDROID_PACKAGE}/;}" ./android/app/src/main/AndroidManifest.xml
universal_sed "1,/__APP_SCHEME__/ {s/__APP_SCHEME__/${APP_ANDROID_SCHEME}/;}" ./android/app/src/main/AndroidManifest.xml
universal_sed "1,/version:/ {s/__versionCode__/${APP_ANDROID_BUILD_NUMBER}/;}" ./android/app/src/main/AndroidManifest.xml
universal_sed "1,/version:/ {s/__versionName__/${APP_ANDROID_VERSION}/;}" ./android/app/src/main/AndroidManifest.xml
cd scripts/android