From 467cf2bf56be8d482c395d56b4a4f06a6363f5e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Lars=C3=A9n?= <slarse@slar.se> Date: Thu, 20 May 2021 18:47:32 +0200 Subject: [PATCH] chore: Fix incorrect early exit in Javadoc quality script (#3932) --- chore/ci-checkstyle-javadoc.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/chore/ci-checkstyle-javadoc.sh b/chore/ci-checkstyle-javadoc.sh index 5e1024ea2f3..9a2bd71debc 100755 --- a/chore/ci-checkstyle-javadoc.sh +++ b/chore/ci-checkstyle-javadoc.sh @@ -17,11 +17,6 @@ JAVADOC_CHECKSTYLE_CONFIG="__SPOON_CI_checkstyle-javadoc.xml" COMPARE_WITH_MASTER_ARG="COMPARE_WITH_MASTER" RELATED_ISSUE_URL="https://github.com/inria/spoon/issues/3923" -if [[ $(git branch --show-current) == "$COMPARE_BRANCH" ]]; then - # nothing to compare, we're on the main branch - exit 0 -fi - function cleanup() { if [ -f "$JAVADOC_CHECKSTYLE_CONFIG" ]; then rm "$JAVADOC_CHECKSTYLE_CONFIG" @@ -105,6 +100,12 @@ if [ "$#" != 1 ]; then fi if [ "$1" == "$COMPARE_WITH_MASTER_ARG" ]; then + if [ $(git branch --show-current) == "$COMPARE_BRANCH" ]; then + # nothing to compare, we're on the main branch + echo "Already on branch $COMPARE_BRANCH, nothing to compare" + exit 0 + fi + main else grep "$1" <<< `run_checkstyle`