2024-09-05 00:38:37 +00:00
|
|
|
from v8_deps import deps
|
2024-08-07 10:17:50 +00:00
|
|
|
import subprocess
|
|
|
|
|
|
|
|
def process(name, dep):
|
2024-10-18 22:08:58 +00:00
|
|
|
if name == 'build':
|
2024-08-07 10:17:50 +00:00
|
|
|
# We have our own fork of this
|
|
|
|
return
|
|
|
|
|
|
|
|
url = dep if isinstance(dep, str) else dep['url']
|
|
|
|
rev = url.split('@')[1]
|
|
|
|
print(name, rev)
|
|
|
|
subprocess.run(['git', 'fetch', 'origin'], cwd=name)
|
|
|
|
subprocess.run(['git', 'checkout', rev], cwd=name)
|
|
|
|
|
|
|
|
failed = False
|
|
|
|
|
|
|
|
with open('.gitmodules') as f:
|
|
|
|
for line in f.readlines():
|
|
|
|
if line.startswith('['):
|
|
|
|
name = line.split(" ")[1][1:-3]
|
|
|
|
if name in deps:
|
|
|
|
try:
|
|
|
|
process(name, deps[name])
|
|
|
|
except:
|
|
|
|
failed = True
|
|
|
|
|
|
|
|
if failed:
|
|
|
|
import sys
|
|
|
|
sys.exit(1)
|
|
|
|
|