From de45fc01036689f6a3c0c91b6e7df2fda7081b4a Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Wed, 5 Aug 2026 20:27:32 +0200 Subject: [PATCH] fix: agree with shellcheck --- scripts/staging-sync.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/staging-sync.sh b/scripts/staging-sync.sh index eca15b5..0732afe 100644 --- a/scripts/staging-sync.sh +++ b/scripts/staging-sync.sh @@ -20,7 +20,7 @@ fi # We only care about PR events if [[ "$ACTION" != "opened" && "$ACTION" != "reopened" && "$ACTION" != "synchronized" && "$ACTION" != "closed" ]]; then - printf "Ignoring PR action: %%s\n" "$ACTION" + printf "Ignoring PR action: %s\n" "$ACTION" exit 0 fi @@ -39,17 +39,17 @@ get_latest_snapshot() { curl -sS -k -X GET \ -H "Authorization: Bearer ${TRUENAS_API_KEY}" \ -H "Accept: application/json" \ - "${TRUENAS_URL}/api/v2.0/zfs/snapshot?id~=${ZFS_DATASET}%%25&limit=1&sort=-creation" | jq -r '.[0].id' + "${TRUENAS_URL}/api/v2.0/zfs/snapshot?id~=${ZFS_DATASET}%25&limit=1&sort=-creation" | jq -r '.[0].id' } -printf "Processing PR #%%s (Action: %%s)\n" "$PR_NUMBER" "$ACTION" +printf "Processing PR #%s (Action: %s)\n" "$PR_NUMBER" "$ACTION" if [[ "$ACTION" == "closed" ]]; then if [ ! -d "$WORKSPACE" ]; then - printf "Workspace %%s does not exist. Nothing to destroy.\n" "$WORKSPACE" + printf "Workspace %s does not exist. Nothing to destroy.\n" "$WORKSPACE" exit 0 fi - printf "Destroying Staging Environment for PR #%%s...\n" "$PR_NUMBER" + printf "Destroying Staging Environment for PR #%s...\n" "$PR_NUMBER" cd "$WORKSPACE" tofu destroy -var="pr_number=${PR_NUMBER}" -auto-approve @@ -61,7 +61,7 @@ if [[ "$ACTION" == "closed" ]]; then fi # Provisioning (opened, reopened, synchronized) -printf "Setting up Staging Environment for PR #%%s...\n" "$PR_NUMBER" +printf "Setting up Staging Environment for PR #%s...\n" "$PR_NUMBER" if [ ! -d "$WORKSPACE" ]; then mkdir -p "$WORKSPACE" @@ -78,7 +78,7 @@ if [ -z "$LATEST_SNAPSHOT" ] || [ "$LATEST_SNAPSHOT" == "null" ]; then exit 1 fi -printf "Latest Snapshot ID: %%s\n" "$LATEST_SNAPSHOT" +printf "Latest Snapshot ID: %s\n" "$LATEST_SNAPSHOT" # Apply OpenTofu tofu init -upgrade