INNER CODE UNIT · Python

validate_app_bundle

RockxyApp/Rockxy · releases/validate_metadata.py:478

def validate_app_bundle(app_path: Path, expected: dict[str, Any]) -> None:
    info_path = app_path
    if app_path.suffix == ".app":
        info_path = app_path / "Contents" / "Info.plist"
    if not info_path.exists():
        fail(f"{info_path} is missing")
    with info_path.open("rb") as handle:
        info = plistlib.load(handle)
    checks = {
        "CFBundleShortVersionString": expected["version"],
        "CFBundleVersion": expected["build"],
    }
    for key, expected_value in checks.items():
        if str(info.get(key, "")) != str(expected_value):
            fail(f"{info_path} {key} is {info.get(key)!r}, expected {expected_value!r}")
    actual_date = normalize_release_date(info.get("RockxyBuildReleaseDate"))
    expected_date = normalize_release_date(expected["release_date"])
    if actual_date != expected_date:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…