修复:fnm 用户 Node.js 检测 + Release Notes 生成失败

fnm 修复:
- 移除错误的 ~/.fnm/current/bin 路径
- macOS/Linux: 扫描  或 ~/.local/share/fnm/node-versions/*/installation/bin
- Windows: 扫描 %FNM_DIR% 或 %APPDATA%\fnm\node-versions\*\installation

release.yml 修复:
- grep 无匹配时返回 exit 1,GitHub Actions pipefail 导致脚本终止
- 用 { grep ... || true; } 包裹,中文 commit message 不再触发失败
This commit is contained in:
晴天
2026-03-06 00:00:26 +08:00
parent b4e959ec99
commit d7d403e8a0
2 changed files with 52 additions and 6 deletions

View File

@@ -161,9 +161,9 @@ jobs:
get_logs() {
local prefix="$1"
if [ -n "$RANGE" ]; then
git log "$RANGE" --pretty=format:"%s" --no-merges | grep -iE "^${prefix}" | sed "s/^${prefix}[:(] */- /" | head -20
git log "$RANGE" --pretty=format:"%s" --no-merges | { grep -iE "^${prefix}" || true; } | sed "s/^${prefix}[:(] */- /" | head -20
else
git log --pretty=format:"%s" --no-merges -30 | grep -iE "^${prefix}" | sed "s/^${prefix}[:(] */- /" | head -20
git log --pretty=format:"%s" --no-merges -30 | { grep -iE "^${prefix}" || true; } | sed "s/^${prefix}[:(] */- /" | head -20
fi
}
@@ -171,9 +171,9 @@ jobs:
FIXES=$(get_logs "fix")
OTHERS=$(
if [ -n "$RANGE" ]; then
git log "$RANGE" --pretty=format:"%s" --no-merges | grep -ivE "^(feat|fix|style|chore|ci|docs|test|build)" | sed 's/^/- /' | head -10
git log "$RANGE" --pretty=format:"%s" --no-merges | { grep -ivE "^(feat|fix|style|chore|ci|docs|test|build)" || true; } | sed 's/^/- /' | head -10
else
git log --pretty=format:"%s" --no-merges -30 | grep -ivE "^(feat|fix|style|chore|ci|docs|test|build)" | sed 's/^/- /' | head -10
git log --pretty=format:"%s" --no-merges -30 | { grep -ivE "^(feat|fix|style|chore|ci|docs|test|build)" || true; } | sed 's/^/- /' | head -10
fi
)