All checks were successful
gestemps/comptaplanapp/pipeline/head This commit looks good
35 lines
888 B
Bash
Executable File
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}"
|
|
|
|
|