- 新增 PRIVACY.md:逐项写明每个联网端点、发送内容、默认开关与关闭方式,明确云候选默认开启、
token 在 config.toml 明文存储、无任何遥测
- 设置页「用户协议」「隐私政策」两个无 handler 的死按钮接上;前者改名为「开源许可协议」指向
LICENSE,开源产品的用户条款就是许可证本身,不再承诺一份不存在的 EULA
- 安装包随包装入 GPL 正文并在安装向导显示(GPLv3 §4/§6),补上打包测试断言
- release.yml 增加 build provenance attestation,并在发布后向 MSIME-Web 发 repository_dispatch,
让 msime.app/update.json 不再等两小时一次的 cron
- 所有 CMakePresets 的 vcpkg 路径改用 $env{VCPKG_ROOT},server 的 Boost 回退不再指向个人目录
- ui/README.md 指向本机绝对路径的 markdown 死链改成相对链接
- 新增 check-developer-paths.sh 并接入 required 的 quality 检查,防止路径回潮
- docs/installation.md 不再写死版本号
43 lines
1.6 KiB
Bash
Executable File
43 lines
1.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# Fail if a build input names somebody's home directory.
|
|
#
|
|
# CI never noticed these because it does not use the presets: ci.yml and release.yml pass
|
|
# -DCMAKE_TOOLCHAIN_FILE explicitly, and release.yml even carries a comment saying the presets point
|
|
# at a developer machine and cannot be used. So the paths only broke people following the README,
|
|
# which is exactly the population this repository is trying to recruit.
|
|
#
|
|
# Editor configuration is deliberately out of scope: the .clangd files are generated per machine by
|
|
# each component's scripts/prepare_env.py and are expected to hold absolute local paths.
|
|
|
|
cd "$(git rev-parse --show-toplevel)"
|
|
|
|
pattern='(C:[\\/]+[Uu]sers[\\/]+|/Users/|/home/)[A-Za-z0-9_.-]+'
|
|
|
|
# Listed into a file rather than an array: mapfile is bash 4+, and macOS still ships bash 3.2, so a
|
|
# contributor running this locally would otherwise get a confusing "command not found".
|
|
candidates=$(git ls-files \
|
|
'*.cmake' \
|
|
'CMakeLists.txt' \
|
|
'**/CMakeLists.txt' \
|
|
'*CMakePresets.json' \
|
|
'*CMakeUserPresets.json' \
|
|
'*.md' \
|
|
| grep -v '^vendor/' || true)
|
|
|
|
if [[ -z "$candidates" ]]; then
|
|
echo 'No build inputs to check.'
|
|
exit 0
|
|
fi
|
|
|
|
if matches=$(printf '%s\n' "$candidates" | tr '\n' '\0' | xargs -0 grep -InE "$pattern"); then
|
|
echo 'Build inputs must not hardcode a developer home directory.'
|
|
echo 'Use $env{VCPKG_ROOT} in presets, an environment variable with a documented fallback in CMake, and a relative link in Markdown.'
|
|
echo
|
|
echo "$matches"
|
|
exit 1
|
|
fi
|
|
|
|
echo 'No developer-specific paths in build inputs.'
|