Skip to content

Commit dc45ed6

Browse files
committed
added manual mode for submodule updater, updated lib_webrtc
1 parent 8902eed commit dc45ed6

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

update_submodules.py

+12-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
import requests
77

8+
manual_mode = True
9+
810
with open('.gitmodules') as f:
911
local_data = f.read()
1012

@@ -27,7 +29,7 @@ def parse_remote_commit(path):
2729
regex = re.compile(r'cmake @ (.*?)<')
2830

2931
try:
30-
return regex.search(r.text).group(1)
32+
return regex.search(r.text).group(1)[:7]
3133
except:
3234
return None
3335

@@ -53,9 +55,17 @@ def parse_remote_commit(path):
5355
path = submodule['path']
5456
current_commit = subprocess.check_output(['git', 'rev-parse', 'HEAD'], cwd=path).decode('utf-8').strip()[:7]
5557
remote_commit = None
58+
custom_commit = None
5659

5760
while remote_commit is None:
58-
remote_commit = parse_remote_commit(path)
61+
if manual_mode:
62+
custom_commit = input('Enter commit for ' + path + ': ')
63+
if custom_commit == '':
64+
custom_commit = None
65+
else:
66+
remote_commit = custom_commit
67+
else:
68+
remote_commit = parse_remote_commit(path)
5969

6070
if remote_commit is None:
6171
time.sleep(3)

0 commit comments

Comments
 (0)