From 0e26d7fb01d1ebfe481e5fccd91d3e2e87030b9f Mon Sep 17 00:00:00 2001 From: phlax Date: Sun, 13 Jun 2021 20:17:36 +0100 Subject: [PATCH] docs: Add minimal requirements check in build.sh (#16957) Signed-off-by: Ryan Northey Commit Message: docs: Add minimal requirements check in build.sh Additional Description: if either bazel or jq are not available then the script will not succeed so bail early and notify user Risk Level: Testing: Docs Changes: Release Notes: Platform Specific Features: --- docs/build.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/build.sh b/docs/build.sh index d27c9dac7c16..abc402106e42 100755 --- a/docs/build.sh +++ b/docs/build.sh @@ -7,6 +7,17 @@ set -e +if [[ ! $(command -v bazel) ]]; then + # shellcheck disable=SC2016 + echo 'ERROR: bazel must be installed and available in "$PATH" to build docs' >&2 + exit 1 +fi +if [[ ! $(command -v jq) ]]; then + # shellcheck disable=SC2016 + echo 'ERROR: jq must be installed and available in "$PATH" to build docs' >&2 + exit 1 +fi + RELEASE_TAG_REGEX="^refs/tags/v.*" if [[ "${AZP_BRANCH}" =~ ${RELEASE_TAG_REGEX} ]]; then