From cefde70968d17d3310f430e500b2cafbc4ef636f Mon Sep 17 00:00:00 2001 From: Nassim Kammah Date: Fri, 1 Dec 2023 06:15:11 +0100 Subject: [PATCH] Allow skip link checks or warn link checks but not both (#2844) --- .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 \