Select Git revision
update_repos
-
Dan Nicholson authored
GitHub API authentication using the `access_token` query paramater has been deprecated[1]. Instead, use HTTP basic authentication. This requires using a `urllib2.Request` object to supply additional headers. In the future this code should probably switch to using `requests`. 1. https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api/#authenticating-using-query-parameters https://phabricator.endlessm.com/T29306
Dan Nicholson authoredGitHub API authentication using the `access_token` query paramater has been deprecated[1]. Instead, use HTTP basic authentication. This requires using a `urllib2.Request` object to supply additional headers. In the future this code should probably switch to using `requests`. 1. https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api/#authenticating-using-query-parameters https://phabricator.endlessm.com/T29306
vagrant-update 664 B
#!/usr/bin/env python
from sh import vagrant
from parse import parse
boxes = {}
dummy_providers = ['aws']
for line in vagrant.box('list'):
box = parse('\x1b[0m{name:^} ({provider}, {version})\x1b[0m', line)
if not box['provider'] in dummy_providers:
if box['name'] in boxes:
if not box['provider'] in boxes[box['name']]:
boxes[box['name']].append(box['provider'])
else:
boxes[box['name']] = [box['provider']]
for box in boxes:
for provider in boxes[box]:
print('Updating box {0} provider {1}.').format(box, provider)
vagrant.box('update', '--provider', provider, '--box', box)