Skip to content

Commit

Permalink
scripts: Fix generate_changelog.sh with empty printf (paritytech#719)
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandru Vasile <[email protected]>
  • Loading branch information
lexnv authored Nov 18, 2022
1 parent 428bc35 commit 6f2623e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/generate_changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ function generate_changelog() {
pr_link="$REMOTE_LINK$pr_number"
# Generate the link as markdown.
pr_md_link=" ([#$pr_number]($pr_link))"
# Print the changelog line as `- commit-title pr-link`.
echo "$line" | awk -v var="$pr_md_link" '{NF--; printf "- "; printf; print var}'
# Print every word from the commit title, except the last word.
# The last word is the PR id that is already included by the pr-link.
# The changelog line is `- commit-title pr-link`.
echo "$line" | awk -v link="$pr_md_link" '{ printf "- "; for(i=1;i<=NF-1;i++) { printf $i" "} print link}'
done <<< "$prs"
}

Expand Down

0 comments on commit 6f2623e

Please sign in to comment.