meson: when running git rev-parse use HEAD instead of checking current branch name

This commit is contained in:
jgmdev 2022-03-02 18:55:46 -04:00
parent 1e765b5c28
commit a587182982
1 changed files with 1 additions and 4 deletions

View File

@ -18,11 +18,8 @@ if get_option('buildtype') != 'release'
git_command = find_program('git', required : false)
if git_command.found()
git_branch = run_command(
[git_command, 'branch', '--show-current']
).stdout().strip()
git_commit = run_command(
[git_command, 'rev-parse', git_branch]
[git_command, 'rev-parse', 'HEAD']
).stdout().strip()
if git_commit != ''