trivial: set FWUPD_GIT_DESCRIBE even if git isn't installed

This commit is contained in:
Mario Limonciello 2017-07-06 09:26:54 -05:00
parent b04c13e1cf
commit 7dabe954e2

View File

@ -17,13 +17,12 @@ conf.set('FWUPD_MICRO_VERSION', fwupd_micro_version)
conf.set_quoted('PACKAGE_VERSION', fwupd_version)
archiver = find_program('git', required : false)
conf.set('FWUPD_GIT_DESCRIBE', 0)
if archiver.found()
result = run_command('git', 'describe')
if result.returncode() == 0
describe = result.stdout().strip()
conf.set_quoted('FWUPD_GIT_DESCRIBE', describe)
else
conf.set('FWUPD_GIT_DESCRIBE', 0)
endif
endif