fix(scripts): exit when change log file is empty
Some checks failed
Helm / helm-unittest (push) Waiting to run
Helm / helm-lint (push) Has been cancelled

This commit is contained in:
Markus Pesch 2025-06-03 21:14:13 +02:00
parent eac8c552bb
commit 7caedbe80d
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982

View File

@ -97,7 +97,11 @@ while IFS= read -r line; do
fi
done <<< "${COMMIT_TITLES}"
yq --no-colors --inplace ".annotations.\"artifacthub.io/changes\" |= loadstr(\"${YAML_FILE}\") | sort_keys(.)" "${CHART_FILE}"
yq --no-colors --inplace ".version = \"${NEW_TAG}\"" "${CHART_FILE}"
if [ -s "${YAML_FILE}" ]; then
yq --no-colors --inplace ".annotations.\"artifacthub.io/changes\" |= loadstr(\"${YAML_FILE}\") | sort_keys(.)" "${CHART_FILE}"
else
echo "ERROR: Changelog file is empty: ${YAML_FILE}"
exit 1
fi
rm "${YAML_FILE}"