зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1637845 - Add source-hosting to the schema and vendoring section r=glob
This will tell us how to interact with the upstream repository. Differential Revision: https://phabricator.services.mozilla.com/D75695 Depends on D75694
This commit is contained in:
Родитель
4b30cdd0dd
Коммит
7c4c1b39f3
|
@ -36,4 +36,5 @@ origin:
|
|||
|
||||
vendoring:
|
||||
url: https://code.videolan.org/videolan/dav1d.git
|
||||
source-hosting: gitlab
|
||||
vendor-directory: third_party/dav1d
|
||||
|
|
|
@ -21,16 +21,7 @@ sys.path.append(os.path.join(lib_path, "pyyaml", "lib"))
|
|||
|
||||
import voluptuous
|
||||
import yaml
|
||||
from voluptuous import (
|
||||
All,
|
||||
FqdnUrl,
|
||||
Length,
|
||||
Match,
|
||||
Msg,
|
||||
Required,
|
||||
Schema,
|
||||
Unique,
|
||||
)
|
||||
from voluptuous import All, FqdnUrl, Length, Match, Msg, Required, Schema, Unique, In
|
||||
from yaml.error import MarkedYAMLError
|
||||
|
||||
# TODO ensure this matches the approved list of licenses
|
||||
|
@ -55,6 +46,8 @@ VALID_LICENSES = [
|
|||
"Unicode", # http://www.unicode.org/copyright.html
|
||||
]
|
||||
|
||||
VALID_SOURCE_HOSTS = ["gitlab"]
|
||||
|
||||
"""
|
||||
---
|
||||
# Third-Party Library Template
|
||||
|
@ -109,6 +102,10 @@ vendoring:
|
|||
# support automated vendoring from selected sources initially.
|
||||
url: source url (generally repository clone url)
|
||||
|
||||
# Type of hosting for the upstream repository
|
||||
# Valid values are 'gitlab', 'github'
|
||||
source-hosting: gitlab
|
||||
|
||||
# Base directory of the location where the source files will live in-tree.
|
||||
# If omitted, will default to the location the moz.yaml file is in.
|
||||
vendor-directory: third_party/directory
|
||||
|
@ -270,6 +267,11 @@ def _schema_1():
|
|||
},
|
||||
"vendoring": {
|
||||
Required("url"): FqdnUrl(),
|
||||
Required("source-hosting"): All(
|
||||
str,
|
||||
Length(min=1),
|
||||
In(VALID_SOURCE_HOSTS, msg="Unsupported Source Hosting"),
|
||||
),
|
||||
"vendor-directory": All(str, Length(min=1)),
|
||||
"patches": Unique([str]),
|
||||
"keep": Unique([str]),
|
||||
|
|
Загрузка…
Ссылка в новой задаче