Ariver
2026-08-14 86f0b4bd20cdec86dfb5bdb7978d1f6ff4af111a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/bin/bash
# Verify Aligner still builds and tests with macOS 14.0 as the deployment target.
 
set -euo pipefail
 
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
OUTPUT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
SOURCE_ROOT="$OUTPUT_ROOT/C1.source"
REPORT_ROOT="$OUTPUT_ROOT/C2.builds/Z-研发中间产物/qa-reports"
REPORT="$REPORT_ROOT/round015-macos14-compatibility-qa.json"
TMP_ROOT=""
 
cleanup() {
  if [ -n "$TMP_ROOT" ]; then
    rm -rf "$TMP_ROOT"
  fi
}
trap cleanup EXIT
 
fail() {
  local message="$1"
  mkdir -p "$REPORT_ROOT"
  cat > "$REPORT" <<JSON
{
  "qa": "round015-macos14-compatibility",
  "status": "failed",
  "minimumMacOS": "14.0",
  "message": "$message"
}
JSON
  echo "FAIL: $message" >&2
  exit 1
}
 
run_step() {
  local name="$1"
  shift
  echo "==> $name"
  "$@"
}
 
TMP_ROOT="$(mktemp -d /tmp/aligner-macos14-compatibility.XXXXXX)"
rsync -a --exclude .build --exclude .swiftpm "$SOURCE_ROOT/" "$TMP_ROOT/C1.source/"
 
run_step "swift-build-macos14" swift build --package-path "$TMP_ROOT/C1.source"
run_step "swift-test-macos14" swift test --package-path "$TMP_ROOT/C1.source"
 
PACKAGE_MINIMUM="$(/usr/bin/grep -F '.macOS("14.0")' "$SOURCE_ROOT/Package.swift" || true)"
PLIST_MINIMUM="$(/usr/libexec/PlistBuddy -c 'Print :LSMinimumSystemVersion' "$SOURCE_ROOT/Resources/Aligner-Info.plist" 2>/dev/null || true)"
APP_INFO_MINIMUM="$(/usr/bin/grep -F 'minimumMacOSVersion = "14.0"' "$SOURCE_ROOT/Sources/AlignerCore/AppInfo.swift" || true)"
PUBLIC_TEMPLATE_MINIMUM="$(/usr/bin/grep -F '"minimumMacOS": "14.0"' "$OUTPUT_ROOT/C3.tools/public-latest-manifest-template.json" || true)"
 
if [ -z "$PACKAGE_MINIMUM" ]; then
  fail "Package.swift does not declare macOS 14.0"
fi
 
if [ "$PLIST_MINIMUM" != "14.0" ]; then
  fail "Info.plist LSMinimumSystemVersion is $PLIST_MINIMUM, expected 14.0"
fi
 
if [ -z "$APP_INFO_MINIMUM" ]; then
  fail "AlignerAppInfo.minimumMacOSVersion is not 14.0"
fi
 
if [ -z "$PUBLIC_TEMPLATE_MINIMUM" ]; then
  fail "public latest manifest template minimumMacOS is not 14.0"
fi
 
mkdir -p "$REPORT_ROOT"
cat > "$REPORT" <<JSON
{
  "qa": "round015-macos14-compatibility",
  "status": "passed",
  "minimumMacOS": "14.0",
  "checks": [
    "Package.swift declares macOS 14.0",
    "Info.plist LSMinimumSystemVersion is 14.0",
    "AlignerAppInfo.minimumMacOSVersion is 14.0",
    "public latest manifest template minimumMacOS is 14.0",
    "swift build passes from clean temporary source copy",
    "swift test passes from clean temporary source copy"
  ]
}
JSON
 
echo "PASS: $REPORT"