Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/utils/release/build-docs.sh | ||
---|---|---|
21 | I don't know if the script needs to comment on whether docs need to be built for -final releases or others. (I also think it's useful to have them for release candidates, so people can get an idea of what the current state of the docs are.) | |
61 | This should be relative to the script's dir, not the cwd. Is there some way to figure this out in bash? | |
70 | This assumes srcdir is a git checkout. One could imagine someone wanting to build the docs after extracting the llvm-project tarball for example. I think the script should either be able to build against any src dir, or it should take a git revision/tag and grab the sources itself. In the script I used, it does the latter, using curl -L https://github.com/llvm/llvm-project/archive/$GIT_REF.tar.gz | tar --strip-components=1 -xzf - | |
84 | In my script I had -DLLVM_BUILD_DOCS=ON | |
101 | In my script I had to move the html around a bit to match the layout of previous docs builds, and so the links to the docs would work. For example, the clang docs would be in tools/clang/docs/html, but the link would point to tools/clang/docs/ |
I suggest the usage of shellcheck linter. A lot of errors can happen due to e.g. missing double quotes causing word splitting on bash.
I left some comments :)
llvm/utils/release/build-docs.sh | ||
---|---|---|
26 | Use double quotes to prevent word split | |
31 | Use $(...) instead of legacy backticks for subshell. Using backticks is limited to one level of subshell and make the rest of the code consistent. | |
45 | Double quotes | |
69 | POSIX test is not so well defined to allow these XSI extensions in a reliable way. Read this for context: https://github.com/koalaman/shellcheck/wiki/SC2166 | |
86 | pushd and popd is not POSIX compliant and are only available via bash, not sh. |
I don't know if the script needs to comment on whether docs need to be built for -final releases or others.
(I also think it's useful to have them for release candidates, so people can get an idea of what the current state of the docs are.)