From: Sébastien Han Date: Tue, 3 Jul 2018 12:12:12 +0000 (+0200) Subject: ceph-ansible-pr-syntax-check: return 1 only on failure X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=ee2b0f710edc031735f04aa8f5f754ba8eeabb6b;p=ceph-build.git ceph-ansible-pr-syntax-check: return 1 only on failure This was a leftover from an initial attempt with if combinaison. We now return 1 only if the test line fails. Signed-off-by: Sébastien Han --- diff --git a/ceph-ansible-pr-syntax-check/build/build b/ceph-ansible-pr-syntax-check/build/build index 4f1e71ee..3be3ec97 100644 --- a/ceph-ansible-pr-syntax-check/build/build +++ b/ceph-ansible-pr-syntax-check/build/build @@ -50,8 +50,8 @@ function group_vars_check { function test_sign_off { git fetch # shellcheck disable=SC2154 - test "$(git log --oneline --no-merges origin/"${ghprbTargetBranch}"..HEAD | wc -l)" -ne "$(git log --no-merges origin/"${ghprbTargetBranch}"..HEAD | grep -c Signed-off-by)" && echo "One or more commits is/are missing a Signed-off-by. Add it with 'git commit -s'." - return 1 + # ghprbTargetBranch variable comes from jenkins's injectedEnvVars + test "$(git log --oneline --no-merges origin/"${ghprbTargetBranch}"..HEAD | wc -l)" -ne "$(git log --no-merges origin/"${ghprbTargetBranch}"..HEAD | grep -c Signed-off-by)" && echo "One or more commits is/are missing a Signed-off-by. Add it with 'git commit -s'." && return 1 }