diff options
author | Harsh Shandilya <msfjarvis@gmail.com> | 2020-10-16 20:48:11 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-16 17:18:11 +0200 |
commit | 6c1e41ba1050c92f4b615f7e857e0d085120a242 (patch) | |
tree | 5be0bc1e6c1a2afeda9ba9566c12a791302b7918 /scripts/signing-setup.sh | |
parent | 92f1aab25da12411aa256c3b763e0cb6182e9320 (diff) |
Revamp build configuration (#1156)
* release: move scripts to scripts directory
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Move CI secrets to secrets directory
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* gradle: uprev to 6.7
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* gradle: suppress warnings about unsupported options
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* build: update dependencies
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* build: move Gradle plugins to ext
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* build: move configuration tasks to buildSrc
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* CHANGELOG: add entry for #1137
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Fix lint warnings
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'scripts/signing-setup.sh')
-rwxr-xr-x | scripts/signing-setup.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/signing-setup.sh b/scripts/signing-setup.sh new file mode 100755 index 00000000..362ec583 --- /dev/null +++ b/scripts/signing-setup.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +set -e + +ENCRYPT_KEY=$1 + +declare -A SECRETS +SECRETS[secrets/keystore.cipher]=keystore.jks +SECRETS[secrets/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 |