Skip to content

Commit

Permalink
CI: get-changes.sh script
Browse files Browse the repository at this point in the history
Get the changes for the Github Releases changelog
  • Loading branch information
DylanVanAssche committed Jan 12, 2022
1 parent 9d978a1 commit 5516c2a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions get-changes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh

FOUND_CHANGES=false
cat CHANGELOG.md | while read line; do
# Detect end of new changes
if [[ "$line" == "## "* ]] && [[ "$FOUND_CHANGES" == true ]]; then
exit 0
fi

# Print new changes
if [[ $FOUND_CHANGES == true ]]; then
echo "$line"
fi

# Detect start of new changes
if [[ "$line" == "## Unreleased"* ]]; then
FOUND_CHANGES=true
fi
done

0 comments on commit 5516c2a

Please sign in to comment.