Skip to content

Commit

Permalink
feat(ci): Update release script (#545)
Browse files Browse the repository at this point in the history
Now that we are using a merge queue, we can't just look for merge
commits since GitHub's merge queue will make a linear history with
squash merging. Also we need to tell git log that our regexp is a
PCRE regular expression.
  • Loading branch information
jonstacks authored Dec 6, 2024
1 parent 6839f09 commit 5d73f12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function gather_prs () {
fi

# format: <commit-sha> <commit-msg> ()<pr-number>)
git log --pretty=format:"%h %s" --merges --grep="#\d+" $1..$2 \
git log --pretty=format:"%h %s" -P --grep="#\d+" $1..$2 \
| while read line ; do
commit_sha=$(echo "$line" | awk '{print $1}') # first field
commit_msg=$(echo "$line" | awk '{$1=""; if ($NF ~ /[(]#[0-9]+[)]/) {$NF=""} ; print }' | sed 's/^\s*//' | sed 's/\s*$//') # 2nd through 2nd-to-last fields, trim leading and trailing whitespace, remove trailing (#PR) field
Expand Down

0 comments on commit 5d73f12

Please sign in to comment.