Skip to content

Commit be9289c

Browse files
authored
Fix NUKE_CERT variables to be case insensitive in bash (#536)
1 parent a41642c commit be9289c

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/create_certs.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ jobs:
5959
id: set_output
6060
run: |
6161
CERT_STATUS_FILE="${{ github.workspace }}/fastlane/new_certificate_needed.txt"
62-
ENABLE_NUKE_CERTS=${{ vars.ENABLE_NUKE_CERTS }}
62+
# Convert to lowercase for case-insensitive comparison
63+
ENABLE_NUKE_CERTS=$(echo "${{ vars.ENABLE_NUKE_CERTS }}" | tr '[:upper:]' '[:lower:]')
64+
FORCE_NUKE_CERTS=$(echo "${{ vars.FORCE_NUKE_CERTS }}" | tr '[:upper:]' '[:lower:]')
6365
6466
if [ -f "$CERT_STATUS_FILE" ]; then
6567
CERT_STATUS=$(cat "$CERT_STATUS_FILE" | tr -d '\n' | tr -d '\r') # Read file content and strip newlines
@@ -81,8 +83,8 @@ jobs:
8183
exit 1
8284
fi
8385
84-
# Check if vars.FORCE_NUKE_CERTS is not set to true
85-
if [ vars.FORCE_NUKE_CERTS = "true" ]; then
86+
# Check if FORCE_NUKE_CERTS is set to true
87+
if [ "$FORCE_NUKE_CERTS" = "true" ]; then
8688
echo "::warning::‼️ Nuking of certificates was forced because the repository variable FORCE_NUKE_CERTS is set to 'true'."
8789
fi
8890

0 commit comments

Comments
 (0)