mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
Update fetch configs for infra projects.
Bug: 1415507 Change-Id: I096b150ca0ee0a4b9a14c3b2059c666cfdf8213b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4379198 Reviewed-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Joanna Wang <jojwang@chromium.org>
This commit is contained in:
@@ -15,21 +15,14 @@ class Infra(config_util.Config):
|
||||
@staticmethod
|
||||
def fetch_spec(props):
|
||||
return {
|
||||
'type': 'gclient_git',
|
||||
'gclient_git_spec': {
|
||||
'solutions': [
|
||||
{
|
||||
'name' : 'infra',
|
||||
'url' : 'https://chromium.googlesource.com/infra/infra.git',
|
||||
'managed' : False,
|
||||
}
|
||||
],
|
||||
},
|
||||
'alias': {
|
||||
'config': 'infra_superproject',
|
||||
},
|
||||
}
|
||||
|
||||
@staticmethod
|
||||
def expected_root(_props):
|
||||
return 'infra'
|
||||
return ''
|
||||
|
||||
|
||||
def main(argv=None):
|
||||
|
||||
@@ -14,26 +14,18 @@ class InfraInternal(config_util.Config):
|
||||
|
||||
@staticmethod
|
||||
def fetch_spec(_props):
|
||||
def url(host, repo):
|
||||
return 'https://%s.googlesource.com/%s.git' % (host, repo)
|
||||
|
||||
spec = {
|
||||
'solutions': [
|
||||
{
|
||||
'name': 'infra_internal',
|
||||
'url': url('chrome-internal', 'infra/infra_internal'),
|
||||
'managed': False
|
||||
},
|
||||
],
|
||||
}
|
||||
return {
|
||||
'type': 'gclient_git',
|
||||
'gclient_git_spec': spec,
|
||||
'alias': {
|
||||
'config': 'infra_superproject',
|
||||
'props': [
|
||||
'--checkout_internal=True',
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
@staticmethod
|
||||
def expected_root(_props):
|
||||
return 'infra_internal'
|
||||
return ''
|
||||
|
||||
|
||||
def main(argv=None):
|
||||
@@ -42,4 +34,3 @@ def main(argv=None):
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main(sys.argv))
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
# found in the LICENSE file.
|
||||
|
||||
import sys
|
||||
import ast
|
||||
|
||||
import config_util # pylint: disable=import-error
|
||||
|
||||
@@ -12,7 +13,7 @@ import config_util # pylint: disable=import-error
|
||||
class InfraSuperproject(config_util.Config):
|
||||
"""Basic Config class for the whole set of Infrastructure repositories."""
|
||||
@staticmethod
|
||||
def fetch_spec(_props):
|
||||
def fetch_spec(props):
|
||||
def url(host, repo):
|
||||
return 'https://%s.googlesource.com/%s.git' % (host, repo)
|
||||
|
||||
@@ -22,12 +23,12 @@ class InfraSuperproject(config_util.Config):
|
||||
'name': '.',
|
||||
'url': url('chromium', 'infra/infra_superproject'),
|
||||
'managed': False,
|
||||
'custom_vars': {
|
||||
'checkout_internal': True
|
||||
}
|
||||
'custom_vars': {},
|
||||
},
|
||||
],
|
||||
}
|
||||
if ast.literal_eval(props.get('checkout_internal', 'False')):
|
||||
spec['solutions'][0]['custom_vars']['checkout_internal'] = True
|
||||
return {
|
||||
'type': 'gclient_git',
|
||||
'gclient_git_spec': spec,
|
||||
|
||||
Reference in New Issue
Block a user