Make shellcheck happy

pull/23964/head
Lidi Zheng 4 years ago
parent cd028e5efa
commit 4f5f082dee
  1. 4
      tools/distrib/docgen/_generate_python_doc.sh
  2. 6
      tools/distrib/docgen/all_lang_docgen.sh

@ -20,11 +20,13 @@ set -ex
# Some Python package installation requires permission to change homedir. But
# due to the user-override in all_lang_docgen.sh, the user in the container
# doesn't have a home dir which leads to permission denied error.
export HOME="/tmp/$(id -u)"
HOME="/tmp/$(id -u)"
export HOME
mkdir -p "${HOME}"
pip install -r requirements.bazel.txt
tools/run_tests/run_tests.py -c opt -l python --compiler python3.8 --newline_on_success -j 8 --build_only
# shellcheck disable=SC1091
source py38_native/bin/activate
pip install --upgrade Sphinx
python setup.py doc

@ -30,13 +30,13 @@
set -e
# Find out the gRPC version and print it
GRPC_VERSION="$(cat build_handwritten.yaml | grep -m1 -Eo ' version: .*' | grep -Eo '[0-9].*')"
GRPC_VERSION="$(grep -m1 -Eo ' version: .*' build_handwritten.yaml | grep -Eo '[0-9].*')"
echo "Generating documents for version ${GRPC_VERSION}..."
# Specifies your GitHub user name or generates documents locally
if [ $# -eq 0 ]; then
read -r -p "- Are you sure to generate documents without push to GitHub? [y/N] " response
if [[ "$response" =~ ^([yY][eE][sS]|[yY])$ ]]; then
if [[ "${response[0]}" =~ ^([yY][eE][sS]|[yY])$ ]]; then
GITHUB_USER=''
else
echo "Generation stopped"
@ -99,7 +99,7 @@ echo " Successfully generated documents for version ${GRPC_VERSION}."
echo "================================================================="
# Uploads to GitHub
if [[ ! -z "${GITHUB_USER}" ]]; then
if [[ -n "${GITHUB_USER}" ]]; then
BRANCH_NAME="doc-${GRPC_VERSION}"
cd "${PAGES_PATH}"

Loading…
Cancel
Save