diff options
| author | jkoan <jkoan@gmx.de> | 2020-03-09 18:45:11 +0100 |
|---|---|---|
| committer | Viktor Verebelyi <vviktor2@gmail.com> | 2020-09-22 02:16:04 +0100 |
| commit | 3fd8ac9db8a978e99dba234ac5a747649d8c00c2 (patch) | |
| tree | 88744334ae8da7d33b488726110c7975e3818700 /scripts | |
| parent | 8f75c416608c1d724db7af75fd73ca42f4ab134e (diff) | |
| download | navit-3fd8ac9db8a978e99dba234ac5a747649d8c00c2.tar.gz | |
fix:android:build:Check if Variables are filled before useing them to avoid errors
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/setup_publish_keys.sh | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/scripts/setup_publish_keys.sh b/scripts/setup_publish_keys.sh index 7c5968423..61ed85b76 100755 --- a/scripts/setup_publish_keys.sh +++ b/scripts/setup_publish_keys.sh @@ -2,10 +2,13 @@ set -e -echo $GOOGLE_KEY | base64 -d > key.json - -wget "https://github.com/navit-gps/infrastructure-blackbox/raw/master/keyrings/keystore.gpg" -openssl aes-256-cbc -d -in keystore.gpg -md md5 -k $KEY > ~/.keystore -keytool -importkeystore -srcstorepass "$STORE_PASS" -deststorepass "$STORE_PASS" -srckeystore /home/circleci/.keystore -destkeystore /home/circleci/.keystore -deststoretype pkcs12 -keytool -keypasswd -alias $KEY_ALIAS -storepass $STORE_PASS -new $KEY_PASS -keystore ~/.keystore -rm keystore.gpg +if [ -n $GOOGLE_KEY ]; then + echo $GOOGLE_KEY | base64 -d > key.json +fi +if [ -n $KEY ]; then + wget "https://github.com/navit-gps/infrastructure-blackbox/raw/master/keyrings/keystore.gpg" + openssl aes-256-cbc -d -in keystore.gpg -md md5 -k $KEY > ~/.keystore + keytool -importkeystore -srcstorepass "$STORE_PASS" -deststorepass "$STORE_PASS" -srckeystore ~/.keystore -destkeystore ~/.keystore -deststoretype pkcs12 + keytool -keypasswd -alias $KEY_ALIAS -storepass $STORE_PASS -new $KEY_PASS -keystore ~/.keystore + rm keystore.gpg +fi |
