diff --git a/test_utils/scripts/get_target_packages.py b/test_utils/scripts/get_target_packages.py index b63c5a8da0d2..99513e442ca9 100644 --- a/test_utils/scripts/get_target_packages.py +++ b/test_utils/scripts/get_target_packages.py @@ -143,12 +143,7 @@ def get_changed_packages(file_list): return answer -def main(): - """Figure out what packages have changed.""" +if __name__ == '__main__': file_list = get_changed_files() for package in sorted(get_changed_packages(file_list)): - print(package) - - -if __name__ == '__main__': - main() + print(package) diff --git a/test_utils/scripts/update_docs.sh b/test_utils/scripts/update_docs.sh index b74e50c11561..daba882ca70d 100755 --- a/test_utils/scripts/update_docs.sh +++ b/test_utils/scripts/update_docs.sh @@ -19,6 +19,8 @@ set -ev GH_OWNER='GoogleCloudPlatform' GH_PROJECT_NAME='google-cloud-python' +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + # Function to build the docs. function build_docs { rm -rf docs/_build/ @@ -53,10 +55,10 @@ else SPHINX_RELEASE=$(git log -1 --pretty=%h) build_docs fi -# Get the current version. Assumes the PWD is the root of the git repo. -# This is only likely to work from within nox, because the environment -# must be set up. -CURRENT_VERSION=$(python scripts/get_version.py) +# Get the current version. +# This is only likely to work from within nox, because the google-cloud +# package must be installed. +CURRENT_VERSION=$(python ${DIR}/get_version.py) # Update gh-pages with the created docs. cd ${GH_PAGES_DIR}