Skip to content

Commit

Permalink
docs: Add minimal requirements check in build.sh (#16957)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Northey <[email protected]>

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:
  • Loading branch information
phlax authored Jun 13, 2021
1 parent b164962 commit 0e26d7f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0e26d7f

Please sign in to comment.