Skip to content

Commit

Permalink
fix: syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
msiegenthaler committed Sep 6, 2023
1 parent 5724745 commit 45c66ca
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions assets/out
Original file line number Diff line number Diff line change
Expand Up @@ -135,26 +135,22 @@ helm_upgrade() {

if [ -n "$values" ]; then
for value in $values; do
if [[ "${value:0:10}" == 'secrets://' ]]; then
# helm secrets files -> Leave the schema "secrets://" and append the path afterwards
suffix=${value:10}
filename="secrets://$source/$suffix"
upgrade_args+=("-f" "$filename")
upgrade_diff_args+=("-f" "$filename")
elif [ -f "$source/$value" ]; then
upgrade_args+=("-f" "$source/"$value)
upgrade_diff_args+=("-f" "$source/"$value)
else
if [ "$skip_missing_values" == "true" ]; then
echo "skipping missing values file $source/$value"
else
echo "value file $source/$value not found"
exit 1
fi
fi
else
if [[ "${value:0:10}" == 'secrets://' ]]; then
# helm secrets files -> Leave the schema "secrets://" and append the path afterwards
suffix=${value:10}
filename="secrets://$source/$suffix"
upgrade_args+=("-f" "$filename")
upgrade_diff_args+=("-f" "$filename")
elif [ -f "$source/$value" ]; then
upgrade_args+=("-f" "$source/"$value)
upgrade_diff_args+=("-f" "$source/"$value)
else
if [ "$skip_missing_values" == "true" ]; then
echo "skipping missing values file $source/$value"
else
echo "value file $source/$value not found"
exit 1
fi
fi
done
fi
Expand Down

0 comments on commit 45c66ca

Please sign in to comment.