Fix truncation to not increase file size

This commit is contained in:
Duncan Ogilvie
2025-01-19 14:07:27 +01:00
parent 51b6e77767
commit 46400f2f40
+3 -1
View File
@@ -8,7 +8,9 @@ if [ $? -eq 0 ]; then
popd
exit 0
fi
truncate -s 65450 ../pr-body.md
if [ $(stat --format=%s ../pr-body.md) -gt 65450 ]; then
truncate -s 65450 ../pr-body.md
fi
echo "\`\`\`" >> ../pr-body.md
NEW_HASH=$(git rev-parse --short origin/master)