diff --git a/.gitea/scripts/add-annotations.sh b/.gitea/scripts/add-annotations.sh index 7794f41..1fed855 100755 --- a/.gitea/scripts/add-annotations.sh +++ b/.gitea/scripts/add-annotations.sh @@ -81,6 +81,8 @@ function map_type_to_kind() { COMMIT_TITLES=$(git log "${OLD_TAG}..${NEW_TAG}" --pretty=format:"%s") +echo "INFO: Generate change log entries from ${OLD_TAG} until ${NEW_TAG}" + while IFS= read -r line; do if [[ "${line}" =~ ^([a-zA-Z]+)(\([^\)]+\))?\:\ (.+)$ ]]; then TYPE="${BASH_REMATCH[1]}" @@ -92,6 +94,8 @@ while IFS= read -r line; do DESC="${BASH_REMATCH[3]}" KIND=$(map_type_to_kind "${TYPE}") + echo "- ${KIND}: ${DESC}" + yq --inplace ". += [ {\"kind\": \"${KIND}\", \"description\": \"${DESC}\"}]" "${YAML_FILE}" fi done <<< "${COMMIT_TITLES}"