Skip to content

Commit 2ce4f85

Browse files
committed
update verify script to check deprecated fields
Signed-off-by: Akhil Mohan <[email protected]>
1 parent 45a776d commit 2ce4f85

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

hack/verify-publishing-bot.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,13 @@ def main():
8080
continue
8181

8282
for item in rule["branches"]:
83-
if not item["source"]["dir"].endswith(rule["destination"]):
83+
if "dir" in item["source"]:
84+
raise Exception("use of deprecated `dir` field in rules for `%s`" % (rule["destination"]))
85+
if len(item["source"]["dirs"]) > 1:
86+
raise Exception("cannot have more than one directory (`%s`) per source branch `%s` of `%s`" %
87+
(item["source"]["dirs"], item["source"]["branch"], rule["destination"])
88+
)
89+
if not item["source"]["dirs"][0].endswith(rule["destination"]):
8490
raise Exception("copy/paste error `%s` refers to `%s`" % (rule["destination"],item["source"]["dir"]))
8591

8692
if branch["name"] != "master":

0 commit comments

Comments
 (0)