Example #1
0
    schema.Optional(basestring):
    schema.Or(
        None,
        basestring,
        _NodeDictSchema({
            # Repo and revision to check out under the path
            # (same as if no dict was used).
            'url':
            basestring,

            # Optional condition string. The dep will only be processed
            # if the condition evaluates to True.
            schema.Optional('condition'):
            basestring,
            schema.Optional('dep_type', default='git'):
            basestring,
        }),
        # CIPD package.
        _NodeDictSchema({
            'packages': [
                _NodeDictSchema({
                    'package': basestring,
                    'version': basestring,
                })
            ],
            schema.Optional('condition'):
            basestring,
            schema.Optional('dep_type', default='cipd'):
            basestring,
        }),
    ),
})
Example #2
0
import ast
import collections

from third_party import schema


# See https://github.com/keleshev/schema for docs how to configure schema.
_GCLIENT_DEPS_SCHEMA = {
    schema.Optional(basestring): schema.Or(
        None,
        basestring,
        {
            # Repo and revision to check out under the path
            # (same as if no dict was used).
            'url': basestring,

            # Optional condition string. The dep will only be processed
            # if the condition evaluates to True.
            schema.Optional('condition'): basestring,
        },
    ),
}

_GCLIENT_HOOKS_SCHEMA = [{
    # Hook action: list of command-line arguments to invoke.
    'action': [basestring],

    # Name of the hook. Doesn't affect operation.
    schema.Optional('name'): basestring,
Example #3
0
    # on gclient hooks. See _GCLIENT_HOOKS_SCHEMA for details.
    # Also see 'pre_deps_hooks'.
    schema.Optional('hooks'):
    _GCLIENT_HOOKS_SCHEMA,

    # Rules which #includes are allowed in the directory.
    # Also see 'skip_child_includes' and 'specific_include_rules'.
    schema.Optional('include_rules'): [basestring],

    # Hooks executed before processing DEPS. See 'hooks' for more details.
    schema.Optional('pre_deps_hooks'):
    _GCLIENT_HOOKS_SCHEMA,

    # Whitelists deps for which recursion should be enabled.
    schema.Optional('recursedeps'):
    [schema.Or(basestring, (basestring, basestring))],

    # Blacklists directories for checking 'include_rules'.
    schema.Optional('skip_child_includes'): [basestring],

    # Mapping from paths to include rules specific for that path.
    # See 'include_rules' for more details.
    schema.Optional('specific_include_rules'): {
        basestring: [basestring]
    },

    # For recursed-upon sub-dependencies, check out their own dependencies
    # relative to the paren't path, rather than relative to the .gclient file.
    schema.Optional('use_relative_paths'):
    bool,