Skip to content

Commit 254fa57

Browse files
committedDec 29, 2024·
Update the release scripts to include the breaking changes section
1 parent de05814 commit 254fa57

File tree

4 files changed

+37
-16
lines changed

4 files changed

+37
-16
lines changed
 

‎.github/workflows/release.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,13 @@ jobs:
2121
id: body
2222
run: |
2323
FILENAME=RELEASE.md
24-
extras/scripts/get-release-body.sh ${{ steps.init.outputs.tag }} CHANGELOG.md | tee $FILENAME
24+
tee $FILENAME <<END
25+
## Changes
26+
27+
$(extras/scripts/extract_changes.awk CHANGELOG.md)
28+
29+
[View version history](https://github.com/bblanchon/ArduinoJson/blob/${{ steps.init.outputs.tag }}/CHANGELOG.md)
30+
END
2531
echo "filename=$FILENAME" >> $GITHUB_OUTPUT
2632
- name: Amalgamate ArduinoJson.h
2733
id: amalgamate_h

‎extras/scripts/extract_changes.awk

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/awk -f
2+
3+
# Start echoing after the first list item
4+
/\* / {
5+
STARTED=1
6+
EMPTY_LINE=0
7+
}
8+
9+
# Remember if we have seen an empty line
10+
/^[[:space:]]*$/ {
11+
EMPTY_LINE=1
12+
}
13+
14+
# Exit when seeing a new version number
15+
/^v[[:digit:]]/ {
16+
if (STARTED) exit
17+
}
18+
19+
# Print if the line is not empty
20+
# and restore the empty line we have skipped
21+
!/^[[:space:]]*$/ {
22+
if (STARTED) {
23+
if (EMPTY_LINE) {
24+
print ""
25+
EMPTY_LINE=0
26+
}
27+
print
28+
}
29+
}

‎extras/scripts/get-release-body.sh

-14
This file was deleted.

‎extras/scripts/get-release-page.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ date: '$(date +'%Y-%m-%d')'
1414
$(extras/scripts/wandbox/publish.sh "$ARDUINOJSON_H")
1515
---
1616
17-
$(awk '/\* /{ FOUND=1; print; next } { if (FOUND) exit}' "$CHANGELOG")
17+
$(extras/scripts/extract_changes.awk "$CHANGELOG")
1818
END

0 commit comments

Comments
 (0)
Please sign in to comment.