Skip to content

Commit b01e43a

Browse files
Fix the docs. (googleapis#3226)
1 parent 3a943fd commit b01e43a

2 files changed

Lines changed: 8 additions & 11 deletions

File tree

test_utils/scripts/get_target_packages.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,7 @@ def get_changed_packages(file_list):
143143
return answer
144144

145145

146-
def main():
147-
"""Figure out what packages have changed."""
146+
if __name__ == '__main__':
148147
file_list = get_changed_files()
149148
for package in sorted(get_changed_packages(file_list)):
150-
print(package)
151-
152-
153-
if __name__ == '__main__':
154-
main()
149+
print(package)

test_utils/scripts/update_docs.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ set -ev
1919
GH_OWNER='GoogleCloudPlatform'
2020
GH_PROJECT_NAME='google-cloud-python'
2121

22+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
23+
2224
# Function to build the docs.
2325
function build_docs {
2426
rm -rf docs/_build/
@@ -53,10 +55,10 @@ else
5355
SPHINX_RELEASE=$(git log -1 --pretty=%h) build_docs
5456
fi
5557

56-
# Get the current version. Assumes the PWD is the root of the git repo.
57-
# This is only likely to work from within nox, because the environment
58-
# must be set up.
59-
CURRENT_VERSION=$(python scripts/get_version.py)
58+
# Get the current version.
59+
# This is only likely to work from within nox, because the google-cloud
60+
# package must be installed.
61+
CURRENT_VERSION=$(python ${DIR}/get_version.py)
6062

6163
# Update gh-pages with the created docs.
6264
cd ${GH_PAGES_DIR}

0 commit comments

Comments
 (0)