Skip to content

修正 CI 脚本语法检查与发版权限检查,补忽略项 - #11

Merged
PathGao merged 1 commit into
mainfrom
repo-hygiene
Oct 3, 2026
Merged

PathGao merged 1 commit into
mainfrom
repo-hygiene

Conversation

@PathGao

@PathGao PathGao commented Oct 3, 2026

Copy link
Copy Markdown
Owner

改了什么

  • CI 的 Shell 语法检查只检查了第一个脚本:sh -n a.sh b.sh 把后面的文件当参数。改为逐个检查 scripts/*.sh。
  • 发版的网络权限检查原来是 aapt2 … | grep -q 放在 if 里,aapt2 失败或收到 SIGPIPE 都会被当成“没有网络权限”放行。改为先存输出,aapt2 失败时步骤直接失败,与 ci.yml 一致。
  • test-device.sh --model 把选好的 adb 通过 ADB 传给 install_test_config.py,没有 .tools 的机器不再出错。
  • .gitignore 补上 .claude/worktrees/、.idea/、*.iml、*.hprof。

验证

用故意写错的脚本复现 sh -n 漏检(返回 0),改后逐个检查 4 个脚本均通过。两个工作流用 yaml.safe_load 解析通过,python3 -m unittest discover -s validation/clef -v 9 项通过。

没测:发版工作流本身没有实际运行。

sh -n 多参数时只检查第一个文件,改为逐个检查 scripts/*.sh。
发版权限检查不再走管道,aapt2 失败时会让步骤失败。
install_test_config.py 使用 test-device.sh 选定的 adb。
忽略 .claude/worktrees/、IDE 文件和堆转储。
@PathGao
PathGao merged commit dd0c6e8 into main Oct 3, 2026
4 checks passed
@PathGao
PathGao deleted the repo-hygiene branch October 3, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant