Skip to content

Commit

Permalink
let's hope sed doesn't fuck up this time
Browse files Browse the repository at this point in the history
  • Loading branch information
hiimjasmine00 committed Aug 5, 2024
1 parent 2b27c46 commit 7fd0218
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,13 @@ jobs:
id: changelog
run: |
curl -s https://raw.githubusercontent.com/${{ github.repository }}/master/changelog.md -o changelog.md
echo changelog=$(awk "/## ${{ steps.version.outputs.version }}/{flag=1; next} /##/{flag=0} flag" changelog.md | sed -e :a -e '/^\n*$/{$d;N;ba}') >> $GITHUB_OUTPUT
# Why does Copilot want to remove EVERY newline? I only want the last one gone.
echo changelog=$(awk "/## ${{ steps.version.outputs.version }}/{flag=1; next} /##/{flag=0} flag" changelog.md | sed -e :a -e '/^\n*$/{$d;N;};/\n$/ba') >> $GITHUB_OUTPUT
- name: Remove Trailing Newline
if: steps.check.outputs.release == '1'
run: |
sed -i -z 's/\n$//' $GITHUB_OUTPUT
- name: Download Build Output
if: steps.check.outputs.release == '1'
Expand Down

0 comments on commit 7fd0218

Please sign in to comment.