From 9cfa9572214429c89adba537fef484a2e14dff9b Mon Sep 17 00:00:00 2001 From: AJ Stuyvenberg Date: Wed, 6 Mar 2024 10:58:06 -0500 Subject: [PATCH] feat: Signing job should run as one-shot or loop over layers --- scripts/sign_layers.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/sign_layers.sh b/scripts/sign_layers.sh index 7e748f70..700bd55a 100755 --- a/scripts/sign_layers.sh +++ b/scripts/sign_layers.sh @@ -41,6 +41,18 @@ if [ "$1" = "prod" ]; then S3_BUCKET_NAME="dd-lambda-signing-bucket" fi +if [ -z "$LAYER_FILE" ]; then + echo "Layer file not specified, running for all layer files." +else + echo "Layer file is specified: $LAYER_FILE" + if (printf '%s\n' "${LAYER_FILES[@]}" | grep -xq $LAYER_FILE); then + LAYER_FILES=($LAYER_FILE) + else + echo "Unsupported layer found, valid options are : ${LAYER_FILES[@]}" + exit 1 + fi +fi + for LAYER_FILE in "${LAYER_FILES[@]}" do echo