Skip to content
File

Blob: archive/setup.py

python25 lines
1#!/usr/bin/env python3
2"""Install the historical peer source needed by the archived hardware experiments."""
3import subprocess
4 
5from support import ROOT, PINS
6from project import verify_checkout
7 
8 
9def main():
10 destination = ROOT / ".tools/vendor/esp-webrtc-solution"
11 revision = PINS["esp-webrtc-solution"]
12 if not destination.exists():
13 destination.parent.mkdir(parents=True, exist_ok=True)
14 subprocess.run(["git", "init", str(destination)], check=True)
15 subprocess.run(["git", "-C", str(destination), "remote", "add", "origin",
16 "https://github.com/espressif/esp-webrtc-solution.git"], check=True)
17 subprocess.run(["git", "-C", str(destination), "fetch", "--depth", "1", "origin", revision], check=True)
18 subprocess.run(["git", "-C", str(destination), "checkout", "--detach", "FETCH_HEAD"], check=True)
19 verify_checkout(destination, revision)
20 print("Archived peer dependency ready. No hardware was accessed.")
21 
22 
23if __name__ == "__main__":
24 main()