This repository has been archived on 2024-12-15. You can view files and clone it, but cannot push or open issues or pull requests.
comptaplan_app/tools/jenkins-build-android.sh
cghislai 5c3bc83a09
All checks were successful
gestemps/comptaplanapp/pipeline/head This commit looks good
Update icon
2021-11-27 18:39:56 +01:00

35 lines
888 B
Bash
Executable File

#!/bin/bash
# debug/release
BUILDMODE=${BUILDMODE:-debug}
# LOCAL/DEV/PROD
APP_TITLE=${APP_TITLE:-}
APP_URI=${APP_URI:-}
APP_COLOR=${APP_COLOR:-}
cat << EOF > android/local.properties
flutter.sdk=/home/developer/flutter
sdk.dir=/home/developer/android
flutter.buildMode=${BUILDMODE}
flutter.versionName=
flutter.versionCode=
EOF
SECRETS_PATH="/var/run/secrets/gestemps"
STOREPASS="$(head -n 1 ${SECRETS_PATH}/signing_keystore.store.password)"
KEYPASS="$(head -n 1 ${SECRETS_PATH}/signing_keystore.key.password)"
KEYALIAS="$(head -n 1 ${SECRETS_PATH}/signing_keystore.key.alias)"
cat << EOF > android/key.properties
storePassword=${STOREPASS}
keyPassword=${KEYPASS}
keyAlias=${KEYALIAS}
storeFile=${SECRETS_PATH}/signing_keystore.jks
EOF
pwd
flutter build appbundle --dart-define="APP_TITLE=${APP_TITLE}" --dart-define="APP_URI=${APP_URI}" --dart-define="APP_COLOR=${APP_COLOR}"