File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 2020 run : |
2121 YESTERDAY=$(date -u --date="yesterday" +%Y-%m-%d)
2222
23- # Extract exactly the section for YESTERDAY
23+ # Extract only the section for yesterday
2424 awk -v date="## $YESTERDAY" '
2525 $0 ~ date {found=1; print; next}
2626 found && /^## [0-9]{4}-[0-9]{2}-[0-9]{2}/ {exit}
3232 exit 0
3333 fi
3434
35+ CHANGELOG_SIZE=$(wc -c < changelog_tmp.md)
36+ echo "Changelog size: $CHANGELOG_SIZE bytes"
37+
38+ # Crop to first 20,000 characters if too large
39+ MAX_SIZE=20000
40+ if [ "$CHANGELOG_SIZE" -gt "$MAX_SIZE" ]; then
41+ echo "WARNING: Changelog too large, cropping to first $MAX_SIZE characters..."
42+ head -c "$MAX_SIZE" changelog_tmp.md > changelog_cropped.md
43+ mv changelog_cropped.md changelog_tmp.md
44+ fi
45+
3546 echo "Creating GitHub release for $YESTERDAY..."
3647 gh release create "$YESTERDAY" -t "$YESTERDAY" -F changelog_tmp.md
You can’t perform that action at this time.
0 commit comments