Skip to content

Commit

Permalink
get_webrtc: update for public prebuilt webrtc
Browse files Browse the repository at this point in the history
  • Loading branch information
c-g-owen committed Sep 10, 2021
1 parent 40d373e commit 556e8d7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions scripts/get_webrtc.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@
repo = 'wireapp/prebuilt-webrtc-binaries'
dest_dir = 'contrib/webrtc'

if len(sys.argv) != 2:
print('usage: {} <release>'.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))

Expand All @@ -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)

0 comments on commit 556e8d7

Please sign in to comment.