summaryrefslogtreecommitdiff
path: root/hack
diff options
context:
space:
mode:
authorTianon Gravi <admwiggin@gmail.com>2014-01-30 12:27:45 -0700
committerTianon Gravi <admwiggin@gmail.com>2014-01-30 12:27:45 -0700
commitc8d1596902704076c8d85a30e80f90f8efb3e175 (patch)
treea21e80f33a6ebe898554e5ca080d97ddc219c384 /hack
parent43b7667dccc4a08cf12a17548df359e0ba118ae1 (diff)
downloaddocker-c8d1596902704076c8d85a30e80f90f8efb3e175.tar.gz
Fix fun Travis DCO check YAML parsing issues (especially with commit messages that start with any kind of whitespace, like this one intentionally does)
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Diffstat (limited to 'hack')
-rwxr-xr-xhack/travis/dco.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/hack/travis/dco.py b/hack/travis/dco.py
index d80d528f9a..f873940815 100755
--- a/hack/travis/dco.py
+++ b/hack/travis/dco.py
@@ -5,7 +5,7 @@ import yaml
from env import commit_range
-commit_format = '-%n hash: "%h"%n author: %aN <%aE>%n message: |%n%w(0,2,2)%B'
+commit_format = '-%n hash: "%h"%n author: %aN <%aE>%n message: |%n%w(0,2,2).%B'
gitlog = subprocess.check_output([
'git', 'log', '--reverse',
@@ -24,6 +24,11 @@ p = re.compile(r'^{0} ([^<]+) <([^<>@]+@[^<>]+)> \(github: (\S+)\)$'.format(re.e
failed_commits = 0
for commit in commits:
+ commit['message'] = commit['message'][1:]
+ # trim off our '.' that exists just to prevent fun YAML parsing issues
+ # see https://github.com/dotcloud/docker/pull/3836#issuecomment-33723094
+ # and https://travis-ci.org/dotcloud/docker/builds/17926783
+
commit['stat'] = subprocess.check_output([
'git', 'log', '--format=format:', '--max-count=1',
'--name-status', commit['hash'], '--',