mirror of
https://github.com/cage-kiosk/cage.git
synced 2025-10-31 22:25:27 -04:00
Update meson.build not to fail if git rev-parse fails
This commit is contained in:
parent
1b9d750dc2
commit
a81ab701d7
1 changed files with 2 additions and 2 deletions
|
|
@ -77,8 +77,8 @@ endif
|
||||||
version = '@0@'.format(meson.project_version())
|
version = '@0@'.format(meson.project_version())
|
||||||
git = find_program('git', native: true, required: false)
|
git = find_program('git', native: true, required: false)
|
||||||
if git.found()
|
if git.found()
|
||||||
git_commit = run_command([git, 'rev-parse', '--short', 'HEAD'], check: true)
|
git_commit = run_command([git, 'rev-parse', '--short', 'HEAD'], check: false)
|
||||||
git_branch = run_command([git, 'rev-parse', '--abbrev-ref', 'HEAD'], check: true)
|
git_branch = run_command([git, 'rev-parse', '--abbrev-ref', 'HEAD'], check: false)
|
||||||
if git_commit.returncode() == 0 and git_branch.returncode() == 0
|
if git_commit.returncode() == 0 and git_branch.returncode() == 0
|
||||||
version = '@0@-@1@ (branch \'@2@\')'.format(
|
version = '@0@-@1@ (branch \'@2@\')'.format(
|
||||||
meson.project_version(),
|
meson.project_version(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue