diff --git a/.travis.yml b/.travis.yml index 41a3504a..5e0cee53 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,6 +57,10 @@ script: python -m doctr deploy --sync --key-path deploy_key.enc "branch-whitelist" --branch-whitelist branch-whitelist; # Test --exclude python -m doctr deploy --sync --key-path deploy_key.enc "exclude-test" --built-docs docs/_build/html --exclude tests.html; + # Test syncing lots of files + mkdir -p lots-of-files-test; + python -c "for i in range(10000): open('lots-of-files-test/test-%s' % i, 'w')"; + python -m doctr deploy --sync --key-path deploy_key.enc lots-of-files-test --built-docs lots-of-files-test; fi - if [[ "${TESTS}" == "true" ]]; then pyflakes doctr; diff --git a/doctr/travis.py b/doctr/travis.py index 178032dc..80a72c66 100644 --- a/doctr/travis.py +++ b/doctr/travis.py @@ -476,10 +476,11 @@ def commit_docs(*, added, removed): DOCTR_COMMAND = ' '.join(map(shlex.quote, sys.argv)) - for f in added: - run(['git', 'add', f]) - for f in removed: - run(['git', 'rm', f]) + + if added: + run(['git', 'add', *added]) + if removed: + run(['git', 'rm', *removed]) commit_message = """\ Update docs after building Travis build {TRAVIS_BUILD_NUMBER} of