fix: omit empty release note sections
TallyNote release / linux-x64 (push) Failing after 8m51s

This commit is contained in:
Qiufeng
2026-09-04 12:42:45 +08:00
parent 89a8edad88
commit 65b5d95937
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "tallynote", "name": "tallynote",
"version": "1.1.28", "version": "1.1.29",
"private": true, "private": true,
"type": "module", "type": "module",
"packageManager": "pnpm@9.0.6", "packageManager": "pnpm@9.0.6",
+5 -5
View File
@@ -109,11 +109,11 @@ generate_release_notes() {
for item in "$@"; do printf -- '- %s\n' "$item"; done for item in "$@"; do printf -- '- %s\n' "$item"; done
printf '\n' printf '\n'
} }
print_group '新增功能' "${features[@]-}" ((${#features[@]})) && print_group '新增功能' "${features[@]}"
print_group '问题修复' "${fixes[@]-}" ((${#fixes[@]})) && print_group '问题修复' "${fixes[@]}"
print_group '优化与重构' "${improvements[@]-}" ((${#improvements[@]})) && print_group '优化与重构' "${improvements[@]}"
print_group '文档与测试' "${docs[@]-}" ((${#docs[@]})) && print_group '文档与测试' "${docs[@]}"
print_group '其他变更' "${other[@]-}" ((${#other[@]})) && print_group '其他变更' "${other[@]}"
if (( ${#features[@]} + ${#fixes[@]} + ${#improvements[@]} + ${#docs[@]} + ${#other[@]} == 0 )); then if (( ${#features[@]} + ${#fixes[@]} + ${#improvements[@]} + ${#docs[@]} + ${#other[@]} == 0 )); then
printf '本版本包含内部维护更新。\n' printf '本版本包含内部维护更新。\n'
fi fi