From 6c1e41ba1050c92f4b615f7e857e0d085120a242 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Fri, 16 Oct 2020 20:48:11 +0530 Subject: Revamp build configuration (#1156) * release: move scripts to scripts directory Signed-off-by: Harsh Shandilya * Move CI secrets to secrets directory Signed-off-by: Harsh Shandilya * gradle: uprev to 6.7 Signed-off-by: Harsh Shandilya * gradle: suppress warnings about unsupported options Signed-off-by: Harsh Shandilya * build: update dependencies Signed-off-by: Harsh Shandilya * build: move Gradle plugins to ext Signed-off-by: Harsh Shandilya * build: move configuration tasks to buildSrc Signed-off-by: Harsh Shandilya * CHANGELOG: add entry for #1137 Signed-off-by: Harsh Shandilya * Fix lint warnings Signed-off-by: Harsh Shandilya --- scripts/encrypt-secret.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 scripts/encrypt-secret.sh (limited to 'scripts/encrypt-secret.sh') diff --git a/scripts/encrypt-secret.sh b/scripts/encrypt-secret.sh new file mode 100755 index 00000000..7c762d19 --- /dev/null +++ b/scripts/encrypt-secret.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +set -ex + +# Simple script that uses OpenSSL to encrypt a provided file with a provided key, and writes the result +# to the provided path. Yes it's very needy. + +INPUT_FILE=$1 +OUTPUT_FILE=$2 +ENCRYPT_KEY=$3 + +if [[ -n "$ENCRYPT_KEY" && -n "$INPUT_FILE" && -n "$OUTPUT_FILE" ]]; then + openssl enc -aes-256-cbc -md sha256 -pbkdf2 -e -in "${INPUT_FILE}" -out "${OUTPUT_FILE}" -k "${ENCRYPT_KEY}" +else + echo "Usage: ./encrypt-secret.sh " +fi -- cgit v1.2.3