mirror of
https://github.com/enix/x509-certificate-exporter.git
synced 2026-08-23 22:16:39 +00:00
fix(ci): properly escape changelog when updating chart.yaml
This commit is contained in:
+7
-3
@@ -23,9 +23,13 @@ yq -i ".appVersion = \"$version\"" Chart.yaml
|
||||
yq -i ".annotations[\"artifacthub.io/prerelease\"] = \"$prerelease\"" Chart.yaml
|
||||
yq -i ".annotations[\"artifacthub.io/containsSecurityUpdates\"] = \"$containsSecurityUpdates\"" Chart.yaml
|
||||
|
||||
yq -i ".annotations[\"artifacthub.io/changes\"] = \"\"" Chart.yaml
|
||||
changes="[]"
|
||||
IFS=$'\n'
|
||||
for line in $notes; do
|
||||
yq -i ".annotations[\"artifacthub.io/changes\"] += \"- $(echo "$line" | sed "s/\\\"/\\\\\"/g")\"" Chart.yaml
|
||||
yq -i $'.annotations[\"artifacthub.io/changes\"] += "\n"' Chart.yaml
|
||||
changes=$(echo $changes | jq ". += [$(echo -n $line | jq -R -s '.')]")
|
||||
done
|
||||
|
||||
rawChanges="$(echo -n $changes | jq -R -s '.')"
|
||||
rawChanges="${rawChanges:1}"
|
||||
rawChanges="${rawChanges%?}"
|
||||
sed -i '' "s/artifacthub.io\\/changes:\ \'\'/artifacthub.io\\/changes: '$rawChanges'/g" Chart.yaml
|
||||
|
||||
Reference in New Issue
Block a user