mirror of
https://github.com/xweiba/location-spoofer.git
synced 2026-09-26 08:31:53 +08:00
docs: 英文 README 设为默认并添加 AGPL 许可
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
ZH="$ROOT/README.md"
|
||||
EN="$ROOT/README.en.md"
|
||||
ZH="$ROOT/README.zh-CN.md"
|
||||
EN="$ROOT/README.md"
|
||||
fail() { echo "FAIL: $*" >&2; exit 1; }
|
||||
|
||||
grep -q 'iOS Location Service Research & Testing Framework' "$ZH" || fail "Chinese README positioning is missing"
|
||||
@@ -49,7 +49,14 @@ done
|
||||
test "$(grep -c '^## ' "$ZH")" -eq "$(grep -c '^## ' "$EN")" \
|
||||
|| fail "Chinese and English README section counts must stay aligned"
|
||||
|
||||
! grep -Eq '^## (许可证|License)$' "$ZH" "$EN" || fail "README must not claim a repository license"
|
||||
test -s "$ROOT/LICENSE" || fail "root AGPL-3.0 license is missing"
|
||||
grep -q "GNU AFFERO GENERAL PUBLIC LICENSE" "$ROOT/LICENSE" || fail "root license must be AGPL-3.0"
|
||||
grep -q '^## 许可证$' "$ZH" || fail "Chinese README license section is missing"
|
||||
grep -q '^## License$' "$EN" || fail "English README license section is missing"
|
||||
grep -q 'ThirdParty/WlocScripts/THIRD_PARTY_NOTICES.md' "$ZH" || fail "Chinese README must retain third-party provenance"
|
||||
grep -q 'ThirdParty/WlocScripts/THIRD_PARTY_NOTICES.md' "$EN" || fail "English README must retain third-party provenance"
|
||||
grep -q 'README.zh-CN.md' "$EN" || fail "English README must link Chinese translation"
|
||||
grep -q 'README.md' "$ZH" || fail "Chinese README must link English default"
|
||||
grep -q '当前项目不支持在 Windows 上直接构建 iOS 应用' "$ZH" || fail "Chinese README must reject Windows source builds"
|
||||
grep -q 'Building the iOS app directly on Windows is not supported' "$EN" || fail "English README must reject Windows source builds"
|
||||
grep -q 'docs/COMMUNITY_TUTORIALS.md' "$ZH" || fail "Chinese README must link the community tutorial submission guide"
|
||||
@@ -70,7 +77,7 @@ grep -q '不得覆盖上述原图' "$ROOT/docs/COMMUNITY_TUTORIALS.md" \
|
||||
|| fail "annotated app assets must not replace categorized source screenshots"
|
||||
|
||||
if grep -Rnw --include='*.md' --include='*.sh' \
|
||||
"$ROOT/build.sh" "$ROOT/README.md" "$ROOT/README.en.md" "$ROOT/docs" "$ROOT/Scripts" \
|
||||
"$ROOT/build.sh" "$ROOT/README.md" "$ROOT/README.zh-CN.md" "$ROOT/docs" "$ROOT/Scripts" \
|
||||
-e 'Impact'; then
|
||||
fail "documentation and build output must use the correct Impactor name"
|
||||
fi
|
||||
|
||||
@@ -39,8 +39,8 @@ grep -Fq "latestVersion: \"$LATEST_VERSION\"" "$CONFIG" \
|
||||
|| fail "Shared/AppRemoteConfiguration.swift fallback latestVersion must match version.txt ($LATEST_VERSION)"
|
||||
grep -Fq "version-v$LATEST_VERSION" "$ROOT/README.md" \
|
||||
|| fail "README.md version badge must match version.txt ($LATEST_VERSION)"
|
||||
grep -Fq "version-v$LATEST_VERSION" "$ROOT/README.en.md" \
|
||||
|| fail "README.en.md version badge must match version.txt ($LATEST_VERSION)"
|
||||
grep -Fq "version-v$LATEST_VERSION" "$ROOT/README.zh-CN.md" \
|
||||
|| fail "README.zh-CN.md version badge must match version.txt ($LATEST_VERSION)"
|
||||
|
||||
grep -q 'static let fallback = AppRemoteConfiguration' "$CONFIG" \
|
||||
|| fail "the app must ship a built-in remote-configuration fallback"
|
||||
|
||||
Reference in New Issue
Block a user