update at 2025-10-15 17:28:11

This commit is contained in:
douboer
2025-10-15 17:28:11 +08:00
parent 7aa6ce1ac2
commit 007eb4d0a5
2 changed files with 31 additions and 27 deletions

6
rel.sh
View File

@@ -49,6 +49,10 @@ fi
VERSION=$(grep "^## v" release.md | tail -n 1 | sed 's/^## //')
TAG_MESSAGE=$(awk "/^## $VERSION/{flag=1;next}/^## v/{flag=0}flag" release.md)
# 过滤掉 emoji4 字节 unicode范围 U+10000 - U+10FFFF避免 utf8mb4 字符导致服务器侧 collation 问题
# 仅在发送到 Gitea 时使用过滤后的内容,保留原始 TAG_MESSAGE 用于本地 tag 注释
RELEASE_BODY=$(printf '%s' "$TAG_MESSAGE" | perl -CSD -0777 -pe 's/[\x{10000}-\x{10FFFF}]//g')
if [ -z "$VERSION" ]; then
echo "❌ release.md 中未找到版本号"
exit 1
@@ -126,7 +130,7 @@ if [ "$check_http_code" -eq 200 ]; then
fi
# 使用 jq 生成正确的 JSON
JSON_PAYLOAD=$(echo "$TAG_MESSAGE" | jq -R -s -c --arg version "$VERSION" '{
JSON_PAYLOAD=$(echo "$RELEASE_BODY" | jq -R -s -c --arg version "$VERSION" '{
tag_name: $version,
name: $version,
body: .,