mirror of
https://review.coreboot.org/flashrom.git
synced 2025-09-13 16:51:58 +02:00
build: only add git describe for git checkouts
Some tools, such as Buildroot, will use packed tarballs of cloned git repositories and trigger builds for the sources. This results in flashrom grabbing incorrect git information. The best option is to solely rely on the VERSION file. Change-Id: Iac60ae253263eab42361b0f73a9c9c95cd547eb5 Signed-off-by: Jacob Rothbauer <rothbauerj@hotmail.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/88967 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Vincent Fazio <vfazio@gmail.com> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
This commit is contained in:

committed by
Anastasia Klimchuk

parent
c6ceecf311
commit
9e0a4fe374
@@ -29,7 +29,7 @@ lt_version = '@0@.@1@.@2@'.format(lt_current, lt_age, lt_revision)
|
||||
|
||||
flashrom_version = meson.project_version()
|
||||
git = find_program('git', native : true, required : false)
|
||||
if git.found()
|
||||
if git.found() and fs.is_dir(meson.project_source_root()/'.git')
|
||||
version_git = run_command('git', 'describe', check : false)
|
||||
if version_git.returncode() == 0
|
||||
flashrom_version += ' (git:@0@)'.format(version_git.stdout().strip())
|
||||
|
Reference in New Issue
Block a user