From a8812d5e8a78afbca8c155ce1ca63034538b1519 Mon Sep 17 00:00:00 2001 From: nassimkammah Date: Thu, 30 Nov 2023 14:13:05 +0100 Subject: [PATCH] Allow skip link checks or warn link checks but not both --- .buildkite/scripts/build.sh | 6 ++---- .buildkite/scripts/build_pr.sh | 5 ++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.buildkite/scripts/build.sh b/.buildkite/scripts/build.sh index af3e8fb3955ea..0eb9756ccf0e8 100755 --- a/.buildkite/scripts/build.sh +++ b/.buildkite/scripts/build.sh @@ -20,10 +20,8 @@ fi if [[ "${BROKEN_LINKS}" == 'skiplinkcheck' ]]; then broken_links_opt="--skiplinkcheck" -else - if [[ "${BROKEN_LINKS}" == 'warnlinkcheck' ]]; then - broken_links_opt="--warnlinkcheck" - fi +elif [[ "${BROKEN_LINKS}" == 'warnlinkcheck' ]]; then + broken_links_opt="--warnlinkcheck" fi if [[ "${BUILDKITE_BRANCH}" == "master" ]]; then diff --git a/.buildkite/scripts/build_pr.sh b/.buildkite/scripts/build_pr.sh index 526332ee1a120..96a5c9baee9b1 100755 --- a/.buildkite/scripts/build_pr.sh +++ b/.buildkite/scripts/build_pr.sh @@ -29,9 +29,8 @@ if [[ ${GITHUB_PR_COMMENT_VAR_REBUILD_OPT:="unset"} == "rebuild" ]];then rebuild_opt=" --rebuild" elif [[ ${GITHUB_PR_COMMENT_VAR_SKIP_OPT:="unset"} == "skiplinkcheck" ]];then build_args+=" --skiplinkcheck" - if [[ ${GITHUB_PR_COMMENT_VAR_WARN_OPT:="unset"} == "warnlinkcheck" ]];then - build_args+=" --warnlinkcheck" - fi +elif [[ ${GITHUB_PR_COMMENT_VAR_WARN_OPT:="unset"} == "warnlinkcheck" ]];then + build_args+=" --warnlinkcheck" fi buildkite-agent \