File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,15 +19,15 @@ cp "$CSV_FILE" "${CSV_FILE}.backup"
1919echo " Updating RELATED_IMAGE_ environment variables in $CSV_FILE ..."
2020
2121# Extract all RELATED_IMAGE_ env var names from the CSV file
22- RELATED_IMAGE_VARS=$( grep -o ' RELATED_IMAGE_[A-Z_]* ' " $CSV_FILE " | sort -u)
22+ RELATED_IMAGE_VARS=$( grep -o -e ' RELATED_IMAGE_[A-Z0-9_]* ' -e ' [A-Z0-9_]*_IMAGE_URL_DEFAULT ' -e ' KUBE_RBAC_PROXY ' " $CSV_FILE " | sort -u)
2323
2424# Track if any errors occurred
2525ERRORS=0
2626
2727# Process each RELATED_IMAGE_ variable
2828for var_name in $RELATED_IMAGE_VARS ; do
2929 # Check if the environment variable exists in the current bash environment
30- if [[ -n " ${ ! var_name:- } " ]]; then
30+ if [[ -v ${ var_name} ]]; then
3131 current_value=" ${! var_name} "
3232 echo " Updating $var_name with value: $current_value "
3333
You can’t perform that action at this time.
0 commit comments