Files
openpilot/tools/release/release_files.py
T
1okko 29123201ea Sync master-dev #2036 (2026-10-06)
Apply the commaai/openpilot -> sunnypilot master sync while preserving c3xl-dev customizations: bundled CD210 startup, model mirror fallback, pyserial launch fix, hidden UI controls, vendored tinygrad, and local vehicle changes. Keep the four modeld_v2 warp pkls; skip the 740MB chestnut big-model artifact.
2026-10-07 11:46:04 +08:00

46 lines
1.0 KiB
Python
Executable File

#!/usr/bin/env python3
import os
import re
import subprocess
import sys
HERE = os.path.abspath(os.path.dirname(__file__))
ROOT = os.path.abspath(os.path.join(HERE, "../.."))
blacklist = [
".git/",
".venv/",
".github/workflows/",
"matlab.*.md",
# no LFS or submodules in release
".lfsconfig",
".gitattributes",
".git$",
".gitmodules",
".run/",
".idea/",
]
# gets you through the blacklist
whitelist: list[str] = [
]
if __name__ == "__main__":
tracked_files = subprocess.check_output(["git", "ls-files", "-z", "--recurse-submodules"], cwd=ROOT).split(b"\0")
for tracked_file in tracked_files:
if not tracked_file:
continue
rf = os.fsdecode(tracked_file)
if not os.getenv("INCLUDE_BIG_MODEL") and rf.startswith("openpilot/selfdrive/modeld/models/big_driving_tinygrad.pkl"):
continue
blacklisted = any(re.search(p, rf) for p in blacklist)
whitelisted = any(re.search(p, rf) for p in whitelist)
if blacklisted and not whitelisted:
continue
sys.stdout.buffer.write(tracked_file + b"\0")