Skip to content

Commit

Permalink
Improves regular expressions in release-notes.sh
Browse files Browse the repository at this point in the history
This makes the expressions more flexible at matching commit messages.

WIP #44
  • Loading branch information
DannyDarwiche committed Jul 22, 2021
1 parent 7a7ba2a commit 1da7f0d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .buildscripts/release-notes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@

# Used to match commit message lines relevant to release note generation
# e.g. "Fixes #24> Add a shiny new weapon" or "Fix #12> Fixed a crash that occurred when eating"
MATCH_ENTRY_LINE="*Fix(es)? #[[:digit:]]+>"
MATCH_ENTRY_LINE="^[ \t]*+[Ff]ix(es)?[ \t]*+#[[:digit:]]+[ \t]*+>"
# Used to capture the release note message and issue number to format later
# e.g. #Fixes #30> Increase character speed by 25%
# Group 1: "#30"
# Group 2: "Increase character speed by 25%"
CAPTURE_ENTRY_INFO="^ *Fixe\?s\? \(#[[:digit:]]\+\) \?> \?\(.*\)"
CAPTURE_ENTRY_INFO="^[ \t]*\+[Ff]ix\(es\)\?[ \t]*\+\(#[[:digit:]]\+\)[ \t]*\+>[ \t]*\+\(.*\)"
# Used to format the previously captured data
# e.g. "- Increase character speed by 25% (#30)"
FORMAT_ENTRY_INFO="- \2 (\1)"
FORMAT_ENTRY_INFO="- \3 (\2)"

# 1) Print the log from the last tag until now
# 2) Find all relevant lines,
Expand Down

0 comments on commit 1da7f0d

Please sign in to comment.