From ee2b0f710edc031735f04aa8f5f754ba8eeabb6b Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Han?= Date: Tue, 3 Jul 2018 14:12:12 +0200 Subject: [PATCH] ceph-ansible-pr-syntax-check: return 1 only on failure MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- ceph-ansible-pr-syntax-check/build/build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 } -- 2.39.5