aboutsummaryrefslogtreecommitdiff
path: root/release/signing-setup.sh
blob: 896a78b068eb56d0d6a9e95ca57482faa4725e87 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env bash

ENCRYPT_KEY=$1

declare -A SECRETS
SECRETS[release/keystore.cipher]=keystore.jks
SECRETS[release/props.cipher]=keystore.properties

if [[ -n "$ENCRYPT_KEY" ]]; then
    for src in "${!SECRETS[@]}"; do
      openssl enc -aes-256-cbc -md sha256 -pbkdf2 -d -in "${src}" -out "${SECRETS[${src}]}" -k "${ENCRYPT_KEY}"
    done
else
    echo "Usage: ./signing-setup.sh <encryption key>"
fi