Skip to content

Commit

Permalink
Trim empty lines at beginning and end of file
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Mar 18, 2021
1 parent ff03948 commit fc79221
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/upload-release-to-plugin-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ jobs:
cat <<- "EOF" >> new_changelog.txt
${{ github.event.release.body }}
EOF
# Normalize empty lines: Trim them from beginning and end of file...
awk 'NF {p=1} p' <<< "$(< new_changelog.txt)" > new_changelog.txt
# ...then add two empty lines at the end.
printf '\n\n' >> new_changelog.txt
tail -n +"${AFTER}" changelog.txt >> new_changelog.txt
mv new_changelog.txt changelog.txt
Expand Down

0 comments on commit fc79221

Please sign in to comment.