Skip to content

Commit

Permalink
added manual mode for submodule updater, updated lib_webrtc
Browse files Browse the repository at this point in the history
  • Loading branch information
xmdnx committed Apr 6, 2024
1 parent 8902eed commit dc45ed6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 12 additions & 2 deletions update_submodules.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

import requests

manual_mode = True

with open('.gitmodules') as f:
local_data = f.read()

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

try:
return regex.search(r.text).group(1)
return regex.search(r.text).group(1)[:7]
except:
return None

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

while remote_commit is None:
remote_commit = parse_remote_commit(path)
if manual_mode:
custom_commit = input('Enter commit for ' + path + ': ')
if custom_commit == '':
custom_commit = None
else:
remote_commit = custom_commit
else:
remote_commit = parse_remote_commit(path)

if remote_commit is None:
time.sleep(3)
Expand Down

0 comments on commit dc45ed6

Please sign in to comment.