openpilot/release/release_files.py
Vehicle Researcher c5d5c5d1f3 openpilot v0.10.1 release
date: 2025-10-24T00:30:59
master commit: 405631baf9685e171a0dd19547cb763f1b163d18
2025-10-24 00:31:03 -07:00

38 lines
718 B
Python
Executable File

#!/usr/bin/env python3
import os
import re
from pathlib import Path
HERE = os.path.abspath(os.path.dirname(__file__))
ROOT = HERE + "/.."
blacklist = [
".git/",
".github/workflows/",
"matlab.*.md",
# no LFS or submodules in release
".lfsconfig",
".gitattributes",
".git$",
".gitmodules",
]
# gets you through the blacklist
whitelist: list[str] = [
]
if __name__ == "__main__":
for f in Path(ROOT).rglob("**/*"):
if not (f.is_file() or f.is_symlink()):
continue
rf = str(f.relative_to(ROOT))
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
print(rf)