Revert to single-line command for doctr invocation.#3578
Revert to single-line command for doctr invocation.#3578pp-mo wants to merge 1 commit intoSciTools:masterfrom
Conversation
| # 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.
It seems strange the > doesn't work.
Have you tested that this line would now work?
There was a problem hiding this comment.
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.
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.