build: fix format-changelog.sh to include only newly added files

This commit is contained in:
Zaiming (Stone) Shi 2023-03-17 13:41:05 +01:00
parent 2e762d1f50
commit d3f56cdbfa
1 changed files with 2 additions and 2 deletions

View File

@ -115,9 +115,9 @@ if [ "$PROFILE" == "emqx-enterprise" ]; then
changes_dir+=("$top_dir/changes/ee") changes_dir+=("$top_dir/changes/ee")
fi fi
while read -d "" -r file; do while read -r file; do
PRS+=("$file") PRS+=("$file")
done < <(git diff --name-only -z -a "tags/${BASE_TAG}...HEAD" "${changes_dir[@]}") done < <(git diff --name-status "tags/${BASE_TAG}...HEAD" "${changes_dir[@]}" | grep -E '^A.*' | awk '{print $2}')
TEMPLATE_FEAT_CHANGES="$(section 'feat')" TEMPLATE_FEAT_CHANGES="$(section 'feat')"
TEMPLATE_PERF_CHANGES="$(section 'perf')" TEMPLATE_PERF_CHANGES="$(section 'perf')"