Generate local version identifier only during development

Fixes #10678.
2 jobs for git_version in 3 minutes (queued for 7 seconds)
latest