aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDanny Hermes <daniel.j.hermes@gmail.com>2015-08-12 15:42:57 -0700
committerDanny Hermes <daniel.j.hermes@gmail.com>2015-08-12 15:42:57 -0700
commitc66169c9f05a9cb6609c545c3a23dfda9da34c9a (patch)
treebfa3940ad40795cd12d057a2ec57ddff7ddd4eb5 /scripts
parent84ab0eee5076dd093534ff82eb4c7512241688f0 (diff)
downloadoauth2client-c66169c9f05a9cb6609c545c3a23dfda9da34c9a.tar.gz
Making docs tox target fail on untracked changes.
Checking if sphinx-apidoc generates new content and failing the script if the content is not checked in to version control.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build-docs7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/build-docs b/scripts/build-docs
index be66396..6f8a274 100755
--- a/scripts/build-docs
+++ b/scripts/build-docs
@@ -27,6 +27,13 @@ rm -rf docs/_build/* docs/source/*
sphinx-apidoc -f -o docs/source oauth2client
# We only have one package, so modules.rst is overkill.
rm -f docs/source/modules.rst
+
+# If anything has changed
+if [[ -n "$(git diff -- docs/)" ]]; then
+ echo "sphinx-apidoc generated changes that are not checked in to version control."
+ exit 1
+fi
+
cd docs
make html
cd ..