Merge pull request #93414 from nikhita/publishing-cm-goversion

publishing: disallow specifying go version for master branch in rules
This commit is contained in:
Kubernetes Prow Robot 2020-08-27 16:05:29 -07:00 committed by GitHub
commit 42f1b278a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,6 +86,11 @@ def main():
if branch["source"]["branch"] != "master":
raise Exception("cannot find master source branch for destination %s" % rule["destination"])
# we specify the go version for all master branches through `default-go-version`
# so ensure we don't specify explicit go version for master branch in rules
if "go" in branch:
raise Exception("go version must not be specified for master branch for destination %s" % rule["destination"])
print("processing : %s" % rule["destination"])
if rule["destination"] not in gomod_dependencies:
raise Exception("missing go.mod for %s" % rule["destination"])