From 065ab744e7d62f80fcd2718d4530db833f488996 Mon Sep 17 00:00:00 2001 From: Adriano Cunha <35786489+adrcunha@users.noreply.github.com> Date: Tue, 5 Nov 2019 13:55:27 -0800 Subject: [PATCH] Run markdown_build_tests directly to: (#1963) * fix readonly var warning * skip unnecessary tests --- test/presubmit-link-check.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/presubmit-link-check.sh b/test/presubmit-link-check.sh index e71f04732..f5ca2a566 100755 --- a/test/presubmit-link-check.sh +++ b/test/presubmit-link-check.sh @@ -18,14 +18,16 @@ # It is started by prow for each PR. # For convenience, it can also be executed manually. +# Force presubmit link checking only. +DISABLE_MD_LINTING=1 + source $(dirname $0)/../vendor/knative.dev/test-infra/scripts/presubmit-tests.sh initialize_environment -if (( IS_PRESUBMIT_EXEMPT_PR )) || (( ! IS_DOCUMENTATION_PR )); then - header "Commit only contains changes that don't require link checks, skipping" + +if [[ -z "$(echo "${CHANGED_FILES}" | grep '\.md')" ]]; then + header "Commit doesn't contain changes that require link checks, skipping" exit 0 fi -# Force presubmit link checking only. -export DISABLE_MD_LINTING=1 -$(dirname $0)/presubmit-tests.sh --build-tests +markdown_build_tests