-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert to single-line command for doctr invocation. #3578
Conversation
@@ -171,8 +171,7 @@ script: | |||
# When we merge a change to SciTools/iris, we can push docs to github pages. | |||
# At present, only the Python 3.7 "doctest" job does this. | |||
# Results appear at https://scitools-docs.github.io/iris/<<branchname>>/index.html | |||
- > | |||
if [[ "${ORG}" == 'SciTools' && "${TRAVIS_EVENT_TYPE}" == 'push' && "${PUSH_BUILT_DOCS}" == 'true' ]]; then | |||
- if [[ "${ORG}" == 'SciTools' && "${TRAVIS_EVENT_TYPE}" == 'push' && "${PUSH_BUILT_DOCS}" == 'true' ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems strange the >
doesn't work.
Have you tested that this line would now work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ">" form seems to leave newlines in it (or possibly carriage-returns, if there is a line-end problem??).
So testing with the yaml package, I get...
>>> with open('.travis.yml') as fo:
... data = yaml.safe_load(fo)
...
>>> print(data['script'][-1])
if [[ "${ORG}" == 'SciTools' && "${TRAVIS_EVENT_TYPE}" == 'push' && "${PUSH_BUILT_DOCS}" == 'true' ]]; then
cd ${INSTALL_DIR};
pip install doctr;
doctr deploy --deploy-repo SciTools-docs/iris --built-docs docs/iris/build/html
--key-path .github/deploy_key.scitools-docs.enc
--no-require-master
${TRAVIS_BRANCH:-${TRAVIS_TAG}};
fi
>>> # definitely newlines ...
>>> print(repr(data['script'][-1]))
'if [[ "${ORG}" == \'SciTools\' && "${TRAVIS_EVENT_TYPE}" == \'push\' && "${PUSH_BUILT_DOCS}" == \'true\' ]]; then\n cd ${INSTALL_DIR};\n pip install doctr;\n doctr deploy --deploy-repo SciTools-docs/iris --built-docs docs/iris/build/html\n --key-path .github/deploy_key.scitools-docs.enc\n --no-require-master\n ${TRAVIS_BRANCH:-${TRAVIS_TAG}};\nfi\n'
>>>
I don't really get this. The ">" form is supposed to "fold" lines + remove newlines, but here we definitely got embedded newlines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tested that this line would now work?
No. It's hard to do unless it's running in the right repository.
In principle, merging to a feature branch might work (which is what Scitools/iris/pushdocs_test was for). I may try that ...
Hi @lbdreyer Tested on separate "feature" branch : it works at last !! 🚀 |
Another go at fixing #3542
Since #3577 seems to have been bugged.