From 556e8d7f285c458ca54c9d8d620a387dea348303 Mon Sep 17 00:00:00 2001 From: Chris Owen Date: Thu, 9 Sep 2021 05:57:21 +0200 Subject: [PATCH] get_webrtc: update for public prebuilt webrtc --- scripts/get_webrtc.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/get_webrtc.py b/scripts/get_webrtc.py index 1281fa2b7..d3fcfad3e 100755 --- a/scripts/get_webrtc.py +++ b/scripts/get_webrtc.py @@ -10,14 +10,16 @@ repo = 'wireapp/prebuilt-webrtc-binaries' dest_dir = 'contrib/webrtc' +if len(sys.argv) != 2: + print('usage: {} '.format(sys.argv[0])) + exit() + release = sys.argv[1] -token = os.environ.get('GITHUB_TOKEN') print('Repo: {}'.format(repo)) print('Release: {}'.format(release)) -#print('Token: {}'.format(token)) -cmd = ['curl', '-X', 'GET', '-u', '{}:x-oauth-basic'.format(token), +cmd = ['curl', '-X', 'GET', '{}/{}/releases'.format(github_base, repo)] releases = json.loads(subprocess.check_output(cmd)) @@ -42,6 +44,6 @@ print('Getting assets for {}'.format(release)) for a in found['assets']: print(a['name']) - cmd = ['curl', '-L', '-u', '{}:x-oauth-basic'.format(token), + cmd = ['curl', '-L', '-H', 'Accept: application/octet-stream', a['url'], '-o', '{}/{}'.format(dest_dir, a['name'])] subprocess.check_output(cmd)