Skip to content

Commit 323c127

Browse files
[FEATURE] minor changes to improve generation of CHANGELOG (- WIP #155 -)
Changes in file .github/workflows/CI-CHGLOG.yml: * fixed a variable name Changes in file generate_changelog.sh: * minor last-minute style improvements
1 parent 5f05957 commit 323c127

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/workflows/CI-CHGLOG.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ jobs:
270270
ref: ${{ needs.check_build.outputs.sha }}
271271
sparse-checkout: '.github/actions/check-control'
272272
- name: "Complete chglog GitHub Check"
273-
id: compleate_chglog
273+
id: complete_chglog
274274
if: ${{ (github.repository == 'reactive-firewall/multicast') && always() }}
275275
uses: ./.github/actions/check-control
276276
with:
@@ -325,7 +325,7 @@ jobs:
325325
printf "%s\n" "chglog_ref=${{ needs.check_build.outputs.build_ref }}" >> "$GITHUB_OUTPUT"
326326
printf "%s\n" "chglog_sha=${{ needs.check_build.outputs.sha }}" >> "$GITHUB_OUTPUT"
327327
printf "%s\n" "chglog_parent_sha=${{ needs.check_build.outputs.parent_sha }}" >> "$GITHUB_OUTPUT"
328-
printf "%s\n" "chglog_ref_name=${{ needs.check_build.outputs.branch_ref }}" >> "$GITHUB_OUTPUT"
328+
printf "%s\n" "chglog_ref_name=${{ needs.check_build.outputs.build_ref_name }}" >> "$GITHUB_OUTPUT"
329329
printf "%s\n" "chglog_environment=${{ needs.check_build.outputs.build_environment }}" >> "$GITHUB_OUTPUT"
330330
printf "%s\n" "chglog_id=${{ github.run_id }}" >> "$GITHUB_OUTPUT"
331331
else

generate_changelog.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,12 +261,12 @@ GIT_RANGE="${1}"
261261
CHANGELOG_BUFFER="${TMPDIR:-/tmp}/.changelog_buffer.txt"
262262
git log "${GIT_RANGE}" --reverse --pretty=format:"COMMIT_START%n%h%n%B%nCOMMIT_END" >"${CHANGELOG_BUFFER}" ; wait ;
263263

264-
RAW_FLAGS_LIST=$(cat <"${CHANGELOG_BUFFER}" | grep -oE "([\[][A-Z]+[]]){1}" | sort -id | uniq -c | sort -rid | grep -oE "([A-Z]+){1}" | sort -id | uniq | sort -rd ; wait ;)
264+
RAW_FLAGS_LIST=$(grep -oE "([\[][A-Z]+[]]){1}" "${CHANGELOG_BUFFER}" | sort -id | uniq -c | sort -rid | grep -oE "([A-Z]+){1}" | sort -id | uniq | sort -rd ; wait ;)
265265

266-
RAW_IMPACTED_ISSUES=$(cat <"${CHANGELOG_BUFFER}" | grep -oE "([#]\d+){1}\b" | sort -id | uniq | xargs -L1 -I{} printf "%s, " "{}" ; wait ;)
266+
RAW_IMPACTED_ISSUES=$(grep -oE "([#]\d+){1}\b" "${CHANGELOG_BUFFER}" | sort -iV | uniq | sort -V | xargs -L1 -I{} printf "%s, " "{}" ; wait ;)
267267
RAW_FLAGS_USED=$(cat <(printf "%s\n" "${RAW_FLAGS_LIST}") | xargs -L1 -I{} printf "%s, " "{}" ; wait ;)
268-
RAW_NEW_FILES=$(cat <"${CHANGELOG_BUFFER}" | grep -F "Additions with file" | sort -id | cut -d\ -f4- | sort -id | uniq -c | tr -s ' ' ' ' | cut -d\ -f 3- | cut -d: -f 1-1 | xargs -L1 -I{} printf "%s, " "{}" ; wait ;)
269-
RAW_DEL_FILES=$(cat <"${CHANGELOG_BUFFER}" | grep -F "Deletions from file" | sort -id | cut -d\ -f4- | sort -id | uniq -c | tr -s ' ' ' ' | cut -d\ -f 3- | cut -d: -f 1-1 | xargs -L1 -I{} printf "%s, " "{}" ; wait ;)
268+
RAW_NEW_FILES=$(grep -F "Additions with file" "${CHANGELOG_BUFFER}" | sort -id | cut -d\ -f4- | sort -id | uniq -c | tr -s ' ' ' ' | cut -d\ -f 3- | cut -d: -f 1-1 | xargs -L1 -I{} printf "%s, " "{}" ; wait ;)
269+
RAW_DEL_FILES=$(grep -F "Deletions from file" "${CHANGELOG_BUFFER}" | sort -id | cut -d\ -f4- | sort -id | uniq -c | tr -s ' ' ' ' | cut -d\ -f 3- | cut -d: -f 1-1 | xargs -L1 -I{} printf "%s, " "{}" ; wait ;)
270270

271271

272272
# header

0 commit comments

Comments
 (0)