Right now it's easy to accidentally check in manpages which contain version specifiers like
Bitcoin Core RPC client version v0.21.0.0-dirty
(for example: run the process two times in a row without committing)
Ideally the script would protect against this. If either the current git tree is dirty, or the binaries report being built from a dirty tree, fail. Maybe only the latter one is relevant, dunno.