diff --git a/python/mozbuild/mozbuild/test/test_manifest.py b/python/mozbuild/mozbuild/test/test_manifest.py index 42ea91a7ef2e..4d83060567ff 100644 --- a/python/mozbuild/mozbuild/test/test_manifest.py +++ b/python/mozbuild/mozbuild/test/test_manifest.py @@ -233,6 +233,7 @@ updatebot: "url": "https://example.com", "source-hosting": "gitlab", "tracking": "commit", + "flavor": "rust" }, "updatebot": { "maintainer-phab": "tjr", @@ -267,6 +268,7 @@ vendoring: url: https://example.com tracking: commit source-hosting: gitlab + flavor: rust bugzilla: product: Core component: Graphics @@ -372,6 +374,51 @@ updatebot: b""" --- schema: 1 +origin: + name: cairo + description: 2D Graphics Library + url: https://www.cairographics.org/ + release: version 1.6.4 + license: + - MPL-1.1 + - LGPL-2.1 + revision: AA001122334455 +vendoring: + url: https://example.com + source-hosting: gitlab + flavor: chocolate +bugzilla: + product: Core + component: Graphics +updatebot: + maintainer-phab: tjr + maintainer-bz: a@example.com + tasks: + - type: vendoring + enabled: False + branch: foo + cc: + - b@example.com + - c@example.com + needinfo: + - d@example.com + - e@example.com + frequency: every + - type: commit-alert + filter: none + frequency: 2 weeks + platform: linux + source-extensions: + - .c + - .cpp + """.strip(), + ), + # ------------------------------------------------- + ( + "exception", + b""" +--- +schema: 1 origin: name: cairo description: 2D Graphics Library diff --git a/python/mozbuild/mozbuild/vendor/moz_yaml.py b/python/mozbuild/mozbuild/vendor/moz_yaml.py index 55e3404a987b..44d9b0e65d9a 100644 --- a/python/mozbuild/mozbuild/vendor/moz_yaml.py +++ b/python/mozbuild/mozbuild/vendor/moz_yaml.py @@ -148,6 +148,10 @@ vendoring: # Valid values are 'gitlab', 'github', googlesource source-hosting: gitlab + # Type of Vendoring + # This is either 'rust' or 'regular' + flavor: rust + # Type of git reference (commit, tag) to track updates from. # If omitted, will default to tracking commits. tracking: commit @@ -431,6 +435,7 @@ def _schema_1(): In(VALID_SOURCE_HOSTS, msg="Unsupported Source Hosting"), ), "tracking": All(str, Length(min=1)), + "flavor": Match(r"^(regular|rust)$"), "skip-vendoring-steps": Unique([str]), "vendor-directory": All(str, Length(min=1)), "patches": Unique([str]),