Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update_build_version.py produce deterministic header. (#5426)
When building, .git directory may not exist in current directory (e.g. chromium build), so it will produce with current timestamp, which becomes non-deterministic build. Check if repo_path is in git repository and use git info. Also fix fallback logic when 'git describe' failed. 'git rev-parse HEAD' result was not used because it didn't update success.
- Loading branch information
what if a build environment doesn't have git at all? This will cause the command_output to fail. This is a bug. We should always check for git