only try to clone repo for stable branch check if loc is a sha
Change-Id: I3283adfb117e64f24481372e8eca7d300afeab9a Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
de5534cbe3
commit
837d6b610e
@ -653,6 +653,16 @@ def validate_stable_branches(deliverable_info, workdir,
|
||||
# The other rules aren't going to be testable, so skip them.
|
||||
continue
|
||||
for repo, loc in sorted(location.items()):
|
||||
if not is_a_hash(loc):
|
||||
mk_error(
|
||||
('tagless stable branches should be created '
|
||||
'from commits by SHA but location %s for '
|
||||
'branch %s of %s does not look '
|
||||
'like a SHA' % (
|
||||
(loc, repo, branch['name'])))
|
||||
)
|
||||
# We can't clone the location if it isn't a SHA.
|
||||
continue
|
||||
# Ensure we have a local copy of the repository so we
|
||||
# can scan for values that are more difficult to get
|
||||
# remotely.
|
||||
@ -664,14 +674,6 @@ def validate_stable_branches(deliverable_info, workdir,
|
||||
# No point in running extra checks if we can't
|
||||
# clone the repository.
|
||||
continue
|
||||
if not is_a_hash(loc):
|
||||
mk_error(
|
||||
('tagless stable branches should be created '
|
||||
'from commits by SHA but location %s for '
|
||||
'branch %s of %s does not look '
|
||||
'like a SHA' % (
|
||||
(loc, repo, branch['name'])))
|
||||
)
|
||||
if not gitutils.commit_exists(workdir, repo, loc):
|
||||
mk_error(
|
||||
('stable branches should be created from merged '
|
||||
|
Loading…
Reference in New Issue
Block a user