1
0
mirror of https://github.com/community-scripts/ProxmoxVE.git synced 2025-03-08 13:19:05 +00:00

fix Release

This commit is contained in:
CanbiZ 2025-03-01 13:14:42 +01:00 committed by GitHub
parent 4101618556
commit f25f13e789
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,7 +20,7 @@ jobs:
run: |
YESTERDAY=$(date -u --date="yesterday" +%Y-%m-%d)
# Extract exactly the section for YESTERDAY
# Extract only the section for yesterday
awk -v date="## $YESTERDAY" '
$0 ~ date {found=1; print; next}
found && /^## [0-9]{4}-[0-9]{2}-[0-9]{2}/ {exit}
@ -32,5 +32,16 @@ jobs:
exit 0
fi
CHANGELOG_SIZE=$(wc -c < changelog_tmp.md)
echo "Changelog size: $CHANGELOG_SIZE bytes"
# Crop to first 20,000 characters if too large
MAX_SIZE=20000
if [ "$CHANGELOG_SIZE" -gt "$MAX_SIZE" ]; then
echo "WARNING: Changelog too large, cropping to first $MAX_SIZE characters..."
head -c "$MAX_SIZE" changelog_tmp.md > changelog_cropped.md
mv changelog_cropped.md changelog_tmp.md
fi
echo "Creating GitHub release for $YESTERDAY..."
gh release create "$YESTERDAY" -t "$YESTERDAY" -F changelog_tmp.md