Something went wrong. Try again.
An auto tiler for macOS
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418#!/bin/bashset -euo pipefail
cd "$(dirname "$0")/../.."unset BASH_ENVif [[ -z ${PARCEL_DEV_BINARY:-} ]]; then PARCEL_DEV_BINARY=$(Scripts/parcel-dev.sh --path)fiPARCEL_DEV_BINARY=$(realpath "$PARCEL_DEV_BINARY")export PARCEL_DEV_BINARYwork=$(mktemp -d "$PWD/.build/packaging fixture.XXXXXX")trap 'rm -rf "$work"' EXITtrap 'printf "Packaging fixture failed at line %s: %s\n" "$LINENO" "$BASH_COMMAND" >&2' ERRmkdir -p "$work/project/Scripts" "$work/project/Resources" "$work/project/Sources" "$work/bin" "$work/products" "$work/probe/Sources/Probe/Resources/Probe.xcassets/Sample.imageset"cp Scripts/swift-build.sh Scripts/product.env Scripts/version.sh Scripts/packaging-paths.sh Scripts/bundle-preflight.sh Scripts/check-app-icons.sh Scripts/parcel-dev.sh Scripts/check-localization-pseudo.sh Scripts/bundle.sh Scripts/check-reality-isolation.sh Scripts/check-bundle.sh Scripts/designated-requirement.sh Scripts/make-dev-cert.sh Scripts/test.sh Scripts/test-e2e.sh Scripts/screen-lock.sh Scripts/check-e2e-results.swift Scripts/test-remote.sh Scripts/remote-sync.sh "$work/project/Scripts/"cp Resources/Info.plist "$work/project/Resources/"printf "export PRODUCT_SUPPORT_EMAIL='support@example.org'\nexport PRODUCT_ISSUES_URL='https://example.org/parcel/issues'\n" >> "$work/project/Scripts/product.env"mkdir "$work/project/Packaging"cp Packaging/Sparkle-LICENSE "$work/project/Packaging/"mkdir -p "$work/project/Packaging/AlternateIcons" "$work/project/Sources/ParcelUI/Resources" "$work/probe/Sources/Probe/Resources/AppIcons"cp Packaging/AlternateIcons/IconTool.swift "$work/project/Packaging/AlternateIcons/"ditto Sources/ParcelUI/Resources/AppIcons "$work/project/Sources/ParcelUI/Resources/AppIcons"ditto Sources/ParcelUI/Resources/AppIcons "$work/probe/Sources/Probe/Resources/AppIcons"ditto Resources/Assets.xcassets "$work/project/Resources/Assets.xcassets"mkdir -p "$work/probe/Plugins/CompileStrings" "$work/probe/Scripts"cp Plugins/CompileStrings/Plugin.swift "$work/probe/Plugins/CompileStrings/"cp Scripts/generate-config-strings.sh Scripts/parcel-dev.sh "$work/probe/Scripts/"cp -R Sources/ParcelDev Sources/parcel-dev "$work/probe/Sources/"printf '%s\n' '// swift-tools-version: 6.2' 'import Foundation' 'import PackageDescription' \ 'let excluded = ProcessInfo.processInfo.environment["PARCEL_BUNDLE_BUILD"] == "1" ? ["Resources/Localizable.xcstrings"] : []' \ 'let package = Package(name: "Probe", defaultLocalization: "en", platforms: [.macOS(.v15)], targets: [.executableTarget(name: "Probe", exclude: excluded, resources: [.process("Resources")], plugins: ["CompileStrings"]), .target(name: "ParcelDev"), .executableTarget(name: "parcel-dev", dependencies: ["ParcelDev"]), .plugin(name: "CompileStrings", capability: .buildTool(), dependencies: ["parcel-dev"])])' > "$work/probe/Package.swift"printf '%s\n' 'import Foundation' 'let arguments = CommandLine.arguments.dropFirst()' \ 'if arguments.contains("--pseudo") { UserDefaults.standard.setVolatileDomain(["AppleLanguages": ["en-XA"]], forName: UserDefaults.argumentDomain) }' \ 'if arguments.contains("--pseudo") {' \ ' precondition(String(localized: "greeting", bundle: .module) == "⟦Ĥéľľó⟧")' \ ' precondition(String(localized: "Hello", bundle: .main) == "⟦Ĥéľľó⟧")' \ '}' \ 'else if arguments.contains("--version") { print("0.1.0") }' \ 'else if arguments.contains("--smoke") {' \ ' for name in ["classic", "night", "sunrise", "patchwork", "sprout", "orbit", "confetti", "blueprint"] {' \ ' for mode in ["light", "dark", "tinted"] { precondition(Bundle.module.url(forResource: "AppIcon-\(name)-\(mode)", withExtension: "png") != nil) }' \ ' }' \ ' precondition(String(localized: "greeting", bundle: .module) == "Hello")' \ ' precondition(Bundle.module.localizedString(forKey: "Source key", value: "Missing", table: nil) == "Source key")' \ ' guard let url = Bundle.module.url(forResource: "fr", withExtension: "lproj"), let french = Bundle(url: url) else { fatalError("Missing French resources") }' \ ' precondition(french.localizedString(forKey: "greeting", value: "Missing", table: nil) == "Bonjour")' \ '}' \ 'else if arguments.contains("--french") { precondition(String(localized: "greeting", bundle: .module) == "Bonjour") }' \ 'else if arguments.contains("--help") { print(String(localized: "greeting", bundle: .module)) }' \ 'else { print(Bundle.module.bundleURL.path) }' > "$work/probe/Sources/Probe/main.swift"printf '%s\n' '{"sourceLanguage":"en","strings":{"greeting":{"localizations":{"en":{"stringUnit":{"state":"translated","value":"Initial"}}}}},"version":"1.0"}' > "$work/probe/Sources/Probe/Resources/Localizable.xcstrings"printf '%s\n' '{"info":{"author":"xcode","version":1}}' > "$work/probe/Sources/Probe/Resources/Probe.xcassets/Contents.json"printf '%s\n' '{"images":[{"filename":"sample.png","idiom":"universal"}],"info":{"author":"xcode","version":1}}' > "$work/probe/Sources/Probe/Resources/Probe.xcassets/Sample.imageset/Contents.json"sips -s format png /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/GenericApplicationIcon.icns --out "$work/probe/Sources/Probe/Resources/Probe.xcassets/Sample.imageset/sample.png" > /dev/nulltest "$(swift run --quiet --package-path "$work/probe" Probe --help)" = InitialPARCEL_BUNDLE_BUILD=1 swift build --quiet --build-system swiftbuild --package-path "$work/probe" --scratch-path "$work/native"printf '%s\n' '{"sourceLanguage":"en","strings":{"Source key":{},"greeting":{"localizations":{"en":{"stringUnit":{"state":"translated","value":"Hello"}},"fr":{"stringUnit":{"state":"translated","value":"Bonjour"}}}}},"version":"1.0"}' > "$work/probe/Sources/Probe/Resources/Localizable.xcstrings"swift run --quiet --package-path "$work/probe" Probe --smokePARCEL_BUNDLE_BUILD=1 swift build --quiet --build-system swiftbuild --package-path "$work/probe" --scratch-path "$work/native"probe_bin=$(PARCEL_BUNDLE_BUILD=1 swift build --build-system swiftbuild --package-path "$work/probe" --scratch-path "$work/native" --show-bin-path)cp "$probe_bin/Probe" "$work/products/ParcelApp"cp "$probe_bin/Probe" "$work/products/prcl"ditto "$probe_bin/Probe_Probe.bundle" "$work/products/Probe_Probe.bundle"ditto "$probe_bin/Probe_Probe.bundle" "$work/products/Parcel_ParcelUI.bundle"mkdir -p "$work/project/Sources/Probe/Resources"cp "$work/probe/Sources/Probe/Resources/Localizable.xcstrings" "$work/project/Sources/Probe/Resources/"rm -rf "$work/probe"# Builds are mocked below; keep the fixture independent of toolchain probing.printf '#!/bin/sh\nset -eu\nexec swift build "$@"\n' > "$work/project/Scripts/swift-build.sh"export TEST_BIN_DIR="$work/products" TEST_SWIFT_LOG="$work/swift.log" TEST_LIPO_LOG="$work/lipo.log"export TEST_SSH_LOG="$work/ssh.log" TEST_RSYNC_LOG="$work/rsync.log"export TEST_CODESIGN_LOG="$work/codesign.log" TEST_SECURITY_LOG="$work/security.log"export PARCEL_SCREEN_LOCK_PATH="$work/screen.lock"export PARCEL_SIGN_IDENTITY=-export PARCEL_SPARKLE_FRAMEWORK="$PWD/.build/artifacts/sparkle/Sparkle/Sparkle.xcframework/macos-arm64_x86_64/Sparkle.framework"export PARCEL_APPCAST_URL=https://example.org/appcast.xmlexport PARCEL_UPDATE_PUBLIC_KEY=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=unset PARCEL_BUNDLE_ID PARCEL_VERSION PARCEL_BUILD_NUMBERcat > "$work/bin/swift" <<'MOCK'#!/bin/bashset -euo pipefailprintf '%s E2E=%s BUNDLE=%s\n' "$*" "${PARCEL_E2E:-}" "${PARCEL_BUNDLE_BUILD:-}" >> "$TEST_SWIFT_LOG"if [[ ${TEST_FAIL_TEST:-0} == 1 && ${1:-} == test ]]; then exit 1fiif [[ " $* " == *' --show-bin-path '* ]]; then printf '%s\n' "$TEST_BIN_DIR"elif [[ ${1:-} == test ]]; then while (( $# )); do if [[ $1 == --xunit-output ]]; then printf '%s\n' '<testsuites><testsuite>' \ '<testcase classname="ParcelE2ETests.RealAppEndToEndTestsPreflight" name="requiredE2ECanRun()"/>' \ '<testcase classname="ParcelE2ETests.RealAppEndToEndTests" name="liveScenario()"/>' \ '</testsuite></testsuites>' > "${2%.xml}-swift-testing.xml" break fi shift donefiMOCKcat > "$work/bin/caffeinate" <<'MOCK'#!/bin/bashset -euo pipefail[[ $1 == -dimsu ]]shiftexec "$@"MOCKcat > "$work/bin/lipo" <<'MOCK'#!/bin/bashset -euo pipefailprintf '%s\n' "$*" >> "$TEST_LIPO_LOG"[[ $# -eq 4 && $2 == -verify_arch && $3 == arm64 && $4 == x86_64 ]]MOCKcat > "$work/bin/git" <<'MOCK'#!/bin/bashset -euo pipefail[[ $* == 'ls-files -z' ]]printf '%s\0' Scripts/test.sh Resources/Info.plist Resources/deleted.txt[[ ${TEST_FAIL_GIT:-0} != 1 ]]MOCKcat > "$work/bin/ssh" <<'MOCK'#!/bin/bashset -euo pipefailprintf '%s\n' "$*" >> "$TEST_SSH_LOG"if [[ $* == *mktemp* ]]; then printf 'run.abc12345\n'fiMOCKcat > "$work/bin/rsync" <<'MOCK'#!/bin/bashset -euo pipefailfor arg in "$@"; do if [[ $arg == --files-from=* ]]; then tr '\0' '\n' < "${arg#--files-from=}" > "$TEST_RSYNC_LOG" printf '%s\n' "$*" >> "$TEST_RSYNC_LOG" exit 0 fidoneexec /usr/bin/rsync "$@"MOCKcat > "$work/bin/security" <<'MOCK'#!/bin/bashset -euo pipefailprintf '%s\n' "$*" >> "$TEST_SECURITY_LOG"if [[ ${TEST_FAIL_SECURITY:-0} == 1 ]]; then exit 1fiprintf '%s\n' "${TEST_IDENTITIES:- 0 valid identities found}"MOCKcat > "$work/bin/codesign" <<'MOCK'#!/bin/bashset -euo pipefailprintf '%s\n' "$*" >> "$TEST_CODESIGN_LOG"if [[ ${1:-} == -dv && ${TEST_FAIL_FRAMEWORK_METADATA:-0} == 1 ]]; then printf 'Could not inspect framework signature\n' >&2 exit 1fiif [[ ${1:-} == -dv && ${TEST_MISSING_FRAMEWORK_TEAM:-0} == 1 ]]; then printf 'Signature=adhoc\n' >&2 exit 0fiif [[ ${1:-} == -dv && -n ${TEST_TEAM_IDENTIFIER:-} ]]; then printf 'TeamIdentifier=%s\n' "$TEST_TEAM_IDENTIFIER" >&2 exit 0fiargs=()while (( $# )); do if [[ $1 == --sign ]]; then args+=(--sign -) shift 2 elif [[ $1 == --timestamp ]]; then if [[ ${TEST_TIMESTAMP_UNAVAILABLE:-0} == 1 ]]; then printf 'Timestamp service unavailable\n' >&2 exit 1 fi shift else args+=("$1") shift fidoneexec /usr/bin/codesign "${args[@]}"MOCKchmod +x "$work/bin/swift" "$work/bin/caffeinate" "$work/bin/lipo" "$work/bin/git" "$work/bin/ssh" "$work/bin/rsync" "$work/bin/security" "$work/bin/codesign"export PATH="$work/bin:$PATH"cd "$work/project"count=0check() { if ! "$@"; then echo "Packaging test failed: $*" >&2 exit 1 fi count=$((count + 1))}fails() { if "$@" > "$work/failure.log" 2>&1; then echo "Expected failure: $*" >&2 /bin/cat "$work/failure.log" >&2 return 1 fi}app_entitlements() { codesign -d --entitlements - --xml "$app" > "$work/app-entitlements.plist" 2> "$work/app-entitlements.log"}library_validation_disabled() { app_entitlements /usr/libexec/PlistBuddy -c 'Print :com.apple.security.cs.disable-library-validation' "$work/app-entitlements.plist"}
check fails Scripts/bundle.sh invalidcheck fails Scripts/bundle.sh releasecheck grep -q 'PARCEL_ALLOW_ADHOC=1' "$work/failure.log"export PARCEL_ALLOW_ADHOC=1check fails env PARCEL_APPCAST_URL=http://example.org/feed Scripts/bundle.sh releasecheck fails env PARCEL_UPDATE_PUBLIC_KEY=bad Scripts/bundle.sh releasecheck fails env PARCEL_SPARKLE_FRAMEWORK=/missing Scripts/bundle.shcheck fails env PARCEL_BUNDLE_ID=bad Scripts/bundle.shcheck fails env PARCEL_VERSION='1;bad' Scripts/bundle.shcheck fails Scripts/designated-requirement.shcheck fails Scripts/designated-requirement.sh missing.appcheck fails Scripts/test-remote.shcheck fails Scripts/test-remote.sh -badcheck fails env TEST_FAIL_GIT=1 Scripts/test-remote.sh test-hostcheck test ! -e "$TEST_SSH_LOG"check test ! -e "$TEST_RSYNC_LOG"printf 'private\n' > Resources/secret.envcheck Scripts/test-remote.sh test-hostcheck grep -q '^Resources/Info.plist$' "$TEST_RSYNC_LOG"check grep -q '^Scripts/test.sh$' "$TEST_RSYNC_LOG"check fails grep -q 'secret.env\|deleted.txt' "$TEST_RSYNC_LOG"check grep -q 'test-host:parcel-ci/run.abc12345/' "$TEST_RSYNC_LOG"check grep -q 'cd ~/parcel-ci/run.abc12345 && Scripts/test.sh' "$TEST_SSH_LOG"printf '%s\0' Resources/Info.plist Scripts/test.sh > "$work/files.list"mkdir "$work/rsync-copy"check /usr/bin/rsync -az --from0 --files-from="$work/files.list" ./ "$work/rsync-copy/"check test -f "$work/rsync-copy/Resources/Info.plist"check test -f "$work/rsync-copy/Scripts/test.sh"check test ! -e "$work/rsync-copy/Resources/secret.env"rm Resources/secret.envcheck fails Scripts/make-dev-cert.sh </dev/null
mkdir -p Resources/Art.xcassets/Sample.imageset Resources/deep Resources/Base.lprojprintf '%s\n' '{"info":{"author":"xcode","version":1}}' > Resources/Art.xcassets/Contents.jsonprintf '%s\n' '{"images":[{"filename":"sample.png","idiom":"universal"}],"info":{"author":"xcode","version":1}}' > Resources/Art.xcassets/Sample.imageset/Contents.jsonsips -s format png /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/GenericApplicationIcon.icns --out Resources/Art.xcassets/Sample.imageset/sample.png > /dev/nullprintf '%s\n' '{"sourceLanguage":"en","strings":{"Hello":{"localizations":{"en":{"stringUnit":{"state":"translated","value":"Hello"}}}}},"version":"1.0"}' > Resources/Localizable.xcstringsprintf 'resource\n' > Resources/deep/sample.txtif ! PARCEL_BUNDLE_ID=org.example.parcel PARCEL_VERSION=2.3.4 PARCEL_BUILD_NUMBER=42 Scripts/bundle.sh debug 2> "$work/bundle.log"; then /bin/cat "$work/bundle.log" >&2 exit 1fiapp=build/Parcel.appif [[ ! -x $app/Contents/MacOS/Parcel ]]; then find build -print >&2 /bin/cat "$work/bundle.log" >&2fiplist=$app/Contents/Info.plistcheck test -x "$app/Contents/MacOS/Parcel"check Scripts/check-bundle.sh --no-launch "$app"check Scripts/check-bundle.sh "$app"check test "$(library_validation_disabled)" = truecheck app_entitlementscheck fails /usr/libexec/PlistBuddy -c 'Print :com.apple.security.get-task-allow' "$work/app-entitlements.plist"check test -L "$app/Contents/Frameworks/Sparkle.framework/Sparkle"check test "$(/usr/libexec/PlistBuddy -c 'Print :ParcelUpdatesEnabled' "$plist")" = falsecheck test "$(/usr/libexec/PlistBuddy -c 'Print :SUEnableAutomaticChecks' "$plist")" = falsecheck fails /usr/libexec/PlistBuddy -c 'Print :SUPublicEDKey' "$plist"check test -x "$app/Contents/Resources/bin/prcl"check test -f "$app/Contents/Resources/bin/Info.plist"check test ! -L "$app/Contents/Resources/bin/Info.plist"check cmp "$app/Contents/Info.plist" "$app/Contents/Resources/bin/Info.plist"check "$app/Contents/Resources/bin/prcl" --french -AppleLanguages '(fr)'check test -d "$app/Contents/Resources/Probe_Probe.bundle"check test -f "$app/Contents/Resources/Probe_Probe.bundle/Contents/Resources/Assets.car"check test -f "$app/Contents/Resources/Probe_Probe.bundle/Contents/Resources/en.lproj/Localizable.strings"check test -f "$app/Contents/Resources/Probe_Probe.bundle/Contents/Resources/fr.lproj/Localizable.strings"check test "$(/usr/libexec/PlistBuddy -c 'Print :CFBundleDevelopmentRegion' "$plist")" = encheck test "$(/usr/libexec/PlistBuddy -c 'Print :CFBundleLocalizations:0' "$plist")" = encheck test "$(/usr/libexec/PlistBuddy -c 'Print :CFBundleLocalizations:1' "$plist")" = frcheck fails /usr/libexec/PlistBuddy -c 'Print :CFBundleLocalizations:2' "$plist"check "$app/Contents/MacOS/Parcel" --french -AppleLanguages '(fr)'check test "$(/usr/libexec/PlistBuddy -c 'Print :CFBundleAllowMixedLocalizations' "$plist")" = truecheck test -f "$app/Contents/Resources/en-XA.lproj/Localizable.strings"check test -f "$app/Contents/Resources/Probe_Probe.bundle/Contents/Resources/en-XA.lproj/Localizable.strings"check "$app/Contents/MacOS/Parcel" --pseudo -AppleLanguages '(fr)'check test -L "$app/Contents/Resources/bin/Probe_Probe.bundle"check test -d "$("$app/Contents/MacOS/Parcel")"check test -d "$("$app/Contents/Resources/bin/prcl")"check codesign --verify --strict --deep "$app"check test -f "$app/Contents/Resources/deep/sample.txt"check test -f "$app/Contents/Resources/Assets.car"check test -f "$app/Contents/Resources/en.lproj/Localizable.strings"check test -f "$app/Contents/Resources/AppIcon.icns"check Scripts/check-app-icons.sh "$app"check test -f "$app/Contents/Resources/Parcel_ParcelUI.bundle/Contents/Resources/AppIcon-blueprint-tinted.png"check test ! -e "$app/Contents/Resources/Parcel_ParcelUI.bundle/Contents/Resources/AppIcons"check test "$(/usr/libexec/PlistBuddy -c 'Print :CFBundleIconFile' "$plist")" = AppIconcheck test "$(/usr/libexec/PlistBuddy -c 'Print :LSMinimumSystemVersion' "$plist")" = 15.0check test "$(/usr/libexec/PlistBuddy -c 'Print :greeting' "$app/Contents/Resources/Probe_Probe.bundle/Contents/Resources/en.lproj/Localizable.strings")" = Hellocheck test "$("$app/Contents/Resources/bin/prcl" --help)" = Hellocheck "$app/Contents/Resources/bin/prcl" --smokecheck test ! -e "$app/Contents/Resources/Probe_Probe.bundle/Contents/Resources/Localizable.xcstrings"check test ! -e "$app/Contents/Resources/Localizable.xcstrings"check test "$(/usr/libexec/PlistBuddy -c 'Print :CFBundleIdentifier' "$plist")" = org.example.parcelcheck test "$(/usr/libexec/PlistBuddy -c 'Print :CFBundleShortVersionString' "$plist")" = 2.3.4check test "$(/usr/libexec/PlistBuddy -c 'Print :CFBundleVersion' "$plist")" = 42source Scripts/product.envcheck test "$(/usr/libexec/PlistBuddy -c 'Print :ParcelSupportEmail' "$plist")" = "$PRODUCT_SUPPORT_EMAIL"check test "$(/usr/libexec/PlistBuddy -c 'Print :ParcelIssuesURL' "$plist")" = "$PRODUCT_ISSUES_URL"check test "$(/usr/libexec/PlistBuddy -c 'Print :LSUIElement' "$plist")" = truecheck codesign --verify --strict "$app"check codesign --verify --strict "$app/Contents/Resources/bin/prcl"check grep -q 'Ad-hoc builds' "$work/bundle.log"check Scripts/designated-requirement.sh "$app" "$app" > "$work/requirements.log"check Scripts/designated-requirement.sh "$app/Contents/MacOS/Parcel" "$app/Contents/MacOS/Parcel" > "$work/executable-requirements.log"check grep -q 'Previous:' "$work/requirements.log"check Scripts/designated-requirement.sh --print "$app" > "$work/print-requirement.log"check test -s "$work/print-requirement.log"check fails grep -q '^Previous:' "$work/print-requirement.log"ditto "$app" "$work/damaged.app"/usr/libexec/PlistBuddy -c 'Set :CFBundleVersion 99' "$work/damaged.app/Contents/Info.plist"check fails Scripts/designated-requirement.sh "$work/damaged.app" "$work/damaged.app"check fails Scripts/designated-requirement.sh "$app" "$work/damaged.app"ditto "$app" "$work/previous.app"/usr/libexec/PlistBuddy -c 'Set :CFBundleVersion 43' "$work/previous.app/Contents/Info.plist"codesign --force --sign - --options runtime "$work/previous.app" > /dev/null 2>&1check fails Scripts/designated-requirement.sh "$work/previous.app" "$app"check grep -q 'Designated requirement changed' "$work/failure.log"mkdir Resources/duplicatecp Resources/Localizable.xcstrings Resources/duplicate/Localizable.xcstringscheck fails Scripts/bundle.shcheck grep -q 'Resource already exists' "$work/failure.log"check codesign --verify --strict "$app"rm Resources/duplicate/Localizable.xcstringsmkdir Resources/Probe_Probe.bundlecheck fails Scripts/bundle.shcheck grep -q 'Resource bundle already exists' "$work/failure.log"check codesign --verify --strict "$app"rmdir Resources/Probe_Probe.bundlecheck Scripts/bundle.sh debug --inspectable > "$work/inspectable.log" 2>&1check app_entitlementscheck test "$(/usr/libexec/PlistBuddy -c 'Print :com.apple.security.get-task-allow' "$work/app-entitlements.plist")" = truecheck test "$(library_validation_disabled)" = truecheck fails Scripts/bundle.sh release --inspectablecheck fails Scripts/bundle.sh release --realitycheck fails Scripts/bundle.sh debug --previewcheck env -u PARCEL_ALLOW_ADHOC PARCEL_SIGN_IDENTITY=Fixture TEST_TIMESTAMP_UNAVAILABLE=1 Scripts/bundle.sh release --preview > "$work/preview.log" 2>&1check test "$(/usr/libexec/PlistBuddy -c 'Print :ParcelUpdatesEnabled' "$plist")" = falsecheck test "$(/usr/libexec/PlistBuddy -c 'Print :SUEnableAutomaticChecks' "$plist")" = falsecheck fails /usr/libexec/PlistBuddy -c 'Print :SUFeedURL' "$plist"check fails /usr/libexec/PlistBuddy -c 'Print :SUPublicEDKey' "$plist"check fails /usr/libexec/PlistBuddy -c 'Print :CFBundleAllowMixedLocalizations' "$plist"check app_entitlementscheck fails /usr/libexec/PlistBuddy -c 'Print :com.apple.security.get-task-allow' "$work/app-entitlements.plist"check Scripts/check-bundle.sh --no-launch "$app"check Scripts/bundle.sh release > "$work/release.log" 2>&1check test ! -e "$app/Contents/Resources/en-XA.lproj"check test ! -e "$app/Contents/Resources/Probe_Probe.bundle/Contents/Resources/en-XA.lproj"check fails /usr/libexec/PlistBuddy -c 'Print :CFBundleAllowMixedLocalizations' "$plist"mkdir "$work/products/Probe_Probe.bundle/Contents/Resources/en-XA.lproj"check fails Scripts/bundle.sh releasecheck grep -q 'Release bundle contains pseudo-localization resources' "$work/failure.log"check codesign --verify --strict "$app"rmdir "$work/products/Probe_Probe.bundle/Contents/Resources/en-XA.lproj"check app_entitlementscheck fails /usr/libexec/PlistBuddy -c 'Print :com.apple.security.get-task-allow' "$work/app-entitlements.plist"check test "$(/usr/libexec/PlistBuddy -c 'Print :SUFeedURL' "$plist")" = "$PARCEL_APPCAST_URL"check test "$(/usr/libexec/PlistBuddy -c 'Print :SUPublicEDKey' "$plist")" = "$PARCEL_UPDATE_PUBLIC_KEY"check Scripts/check-bundle.sh --no-launch "$app"check grep -q -- '--preserve-metadata=entitlements.*Downloader.xpc' "$TEST_CODESIGN_LOG"check grep -q 'build --scratch-path .*\.build/bundle/normal --build-system swiftbuild -c release .*--product ParcelApp E2E= BUNDLE=1' "$TEST_SWIFT_LOG"check fails grep -Fq 'ConciseMagicFile' "$TEST_SWIFT_LOG"check fails grep -q -- '--arch' "$TEST_SWIFT_LOG"check grep -q 'ParcelApp -verify_arch arm64 x86_64' "$TEST_LIPO_LOG"check grep -q 'prcl -verify_arch arm64 x86_64' "$TEST_LIPO_LOG"check test "$(/usr/libexec/PlistBuddy -c 'Print :CFBundleIdentifier' "$plist")" = dev.vinnymac.parcelcheck env -u PARCEL_SIGN_IDENTITY Scripts/bundle.sh > "$work/default-sign.log" 2>&1check grep -q 'Ad-hoc builds lose' "$work/default-sign.log"check grep -Fq "$HOME/Library/Keychains/login.keychain-db" "$TEST_SECURITY_LOG"fingerprint=0123456789ABCDEF0123456789ABCDEF01234567identities=" 1) $fingerprint \"Parcel Development\""check env -u PARCEL_SIGN_IDENTITY TEST_IDENTITIES="$identities" TEST_TIMESTAMP_UNAVAILABLE=1 Scripts/bundle.sh > "$work/dev-sign.log" 2>&1check grep -q -- "--sign $fingerprint --options runtime --timestamp=none" "$TEST_CODESIGN_LOG"check test ! -s "$work/dev-sign.log"check Scripts/check-bundle.sh --no-launch "$app"check test "$(library_validation_disabled)" = truecheck env TEST_TIMESTAMP_UNAVAILABLE=1 TEST_TEAM_IDENTIFIER=ABCDE12345 PARCEL_SIGN_IDENTITY='Developer ID Application: Fixture (ABCDE12345)' Scripts/bundle.sh > "$work/team-sign.log" 2>&1check env TEST_TEAM_IDENTIFIER=ABCDE12345 Scripts/check-bundle.sh --no-launch "$app"check app_entitlementscheck test ! -s "$work/app-entitlements.plist"check grep -Fq -- '--sign Developer ID Application: Fixture (ABCDE12345) --options runtime --timestamp=none' "$TEST_CODESIGN_LOG"check env TEST_TEAM_IDENTIFIER=ABCDE12345 PARCEL_SIGN_IDENTITY='Developer ID Application: Fixture (ABCDE12345)' Scripts/bundle.sh release > "$work/team-release.log" 2>&1check grep -Fq -- '--sign Developer ID Application: Fixture (ABCDE12345) --options runtime --timestamp ' "$TEST_CODESIGN_LOG"check fails env TEST_TIMESTAMP_UNAVAILABLE=1 TEST_TEAM_IDENTIFIER=ABCDE12345 PARCEL_SIGN_IDENTITY='Developer ID Application: Fixture (ABCDE12345)' Scripts/bundle.sh releasecheck grep -q 'Timestamp service unavailable' "$work/failure.log"check codesign --verify --strict --deep "$app"check Scripts/bundle.sh > "$work/restored-sign.log" 2>&1check Scripts/check-bundle.sh --no-launch "$app"check test "$(library_validation_disabled)" = truecheck fails env TEST_FAIL_FRAMEWORK_METADATA=1 Scripts/bundle.shcheck grep -q 'Could not inspect framework signature' "$work/failure.log"check fails env TEST_MISSING_FRAMEWORK_TEAM=1 Scripts/bundle.shcheck grep -q 'no team identifier metadata' "$work/failure.log"check fails env -u PARCEL_SIGN_IDENTITY TEST_IDENTITIES="$identities$identities" Scripts/bundle.shcheck grep -q 'More than one Parcel Development identity' "$work/failure.log"check fails env -u PARCEL_SIGN_IDENTITY TEST_FAIL_SECURITY=1 Scripts/bundle.shcheck env TEST_FAIL_SECURITY=1 Scripts/bundle.sh > "$work/override-sign.log" 2>&1# Dedicated reality fixtures cover debug's helper; this probe checks release packaging.check Scripts/test-e2e.sh releasecheck grep -q 'build --quiet -c release --product FixtureApp E2E=' "$TEST_SWIFT_LOG"check grep -Fq 'test -c release --no-parallel --xunit-output ' "$TEST_SWIFT_LOG"check grep -Fq ' --filter ^ParcelE2ETests\. E2E=1' "$TEST_SWIFT_LOG"check fails env TEST_FAIL_TEST=1 Scripts/test-e2e.sh releasecheck fails Scripts/test-e2e.sh invalidcheck grep -q 'Usage:' "$work/failure.log"printf 'Packaging checks passed: %s\n' "$count"