ci: consolidate rustdoc validation#1015
Conversation
8eb8275 to
dd92644
Compare
| .PHONY: doc | ||
| doc: ## Generate and check documentation for workspace crates only | ||
| rm -rf "${CARGO_TARGET_DIR:-target}/doc" | ||
| rm -rf "$${CARGO_TARGET_DIR:-target}/doc" |
There was a problem hiding this comment.
Doesn't this escape the env var and try to remove the literal path ${CARGO_TARGET_DIR:-target}/doc?
There was a problem hiding this comment.
No, this is the Makefile escaping we need here. In a make recipe, $$ is reduced to a single $ before the command is handed to the shell, so the shell still receives:
${CARGO_TARGET_DIR:-target}/doc
and expands it normally.
The previous version with a single $ was actually the broken one: make tried to expand ${CARGO_TARGET_DIR:-target} as a make variable, which was empty locally, so the command became rm -rf "/doc". I verified make doc with this change, and it now cleans the intended target doc directory before building docs.
There was a problem hiding this comment.
Whoops, thought I was looking at a task in .github/workflows/* 😬
Fix doc breakage from #986 and consolidate check jobs into one CI job