From a3a2fbe62891b5715f81a1de92e6cec7e07034ff Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Thu, 7 May 2015 16:13:56 -0700 Subject: [PATCH] do not check dco in travis Signed-off-by: Victor Vieux --- .travis.yml | 1 - script/validate-dco | 56 --------------------------------------------- 2 files changed, 57 deletions(-) delete mode 100755 script/validate-dco diff --git a/.travis.yml b/.travis.yml index 10da2d8099..3b899d0e70 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,6 @@ install: - go get github.com/GeertJohan/fgt script: - - script/validate-dco - script/validate-gofmt - go vet ./... - fgt golint ./... diff --git a/script/validate-dco b/script/validate-dco deleted file mode 100755 index 1c75d91bfa..0000000000 --- a/script/validate-dco +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash - -source "$(dirname "$BASH_SOURCE")/.validate" - -adds=$(validate_diff --numstat | awk '{ s += $1 } END { print s }') -dels=$(validate_diff --numstat | awk '{ s += $2 } END { print s }') -notDocs="$(validate_diff --numstat | awk '$3 !~ /^docs\// { print $3 }')" - -: ${adds:=0} -: ${dels:=0} - -# "Username may only contain alphanumeric characters or dashes and cannot begin with a dash" -githubUsernameRegex='[a-zA-Z0-9][a-zA-Z0-9-]+' - -# https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work -dcoPrefix='Signed-off-by:' -dcoRegex="^(Docker-DCO-1.1-)?$dcoPrefix ([^<]+) <([^<>@]+@[^<>]+)>( \\(github: ($githubUsernameRegex)\\))?$" - -check_dco() { - grep -qE "$dcoRegex" -} - -if [ $adds -eq 0 -a $dels -eq 0 ]; then - echo '0 adds, 0 deletions; nothing to validate! :)' -elif [ -z "$notDocs" -a $adds -le 1 -a $dels -le 1 ]; then - echo 'Congratulations! DCO small-patch-exception material!' -else - commits=( $(validate_log --format='format:%H%n') ) - badCommits=() - for commit in "${commits[@]}"; do - if [ -z "$(git log -1 --format='format:' --name-status "$commit")" ]; then - # no content (ie, Merge commit, etc) - continue - fi - if ! git log -1 --format='format:%B' "$commit" | check_dco; then - badCommits+=( "$commit" ) - fi - done - if [ ${#badCommits[@]} -eq 0 ]; then - echo "Congratulations! All commits are properly signed with the DCO!" - else - { - echo "These commits do not have a proper '$dcoPrefix' marker:" - for commit in "${badCommits[@]}"; do - echo " - $commit" - done - echo - echo 'Please amend each commit to include a properly formatted DCO marker.' - echo - echo 'Visit the following URL for information about the Docker DCO:' - echo ' https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work' - echo - } >&2 - false - fi -fi