Skip to content

Commit 7e66fcf

Browse files
committed
improved to output branches with no matching dockerfile checked
1 parent c4e0f02 commit 7e66fcf

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

dockerfiles_check_git_branches.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
sys.exit(4)
9292

9393
__author__ = 'Hari Sekhon'
94-
__version__ = '0.7.0'
94+
__version__ = '0.7.1'
9595

9696

9797
class DockerfileGitBranchCheckTool(CLI):
@@ -152,9 +152,11 @@ def run(self):
152152
if branches_skipped > 0:
153153
log.warn('{0} branches skipped for not matching expected naming format'
154154
.format(branches_skipped))
155-
branches_not_checked = len(self.selected_branches) - len(self.branches_dockerfile_checked)
156-
if branches_not_checked > 1:
157-
log.warn('{0} branches not checked (no matching Dockerfile found?)'.format(branches_not_checked))
155+
branches_not_checked = [branch for branch in self.selected_branches \
156+
if branch not in self.branches_dockerfile_checked]
157+
if len(branches_not_checked) > 1:
158+
log.warn('{0} branches not checked (no matching Dockerfile found?): {1}'\
159+
.format(len(branches_not_checked), branches_not_checked))
158160
if log.isEnabledFor(logging.DEBUG):
159161
log.debug('Branches with no corresponding Dockerfile found:\n%s',
160162
'\n'.join(set(self.selected_branches) - set(self.branches_dockerfile_checked)))

0 commit comments

Comments
 (0)