meson.build: make git version string less confusing
compton built from the git repo often _seems_ to be from a older release, this change disambiguate the version string. compton built from the git repo now have version string like this: 'vgit-xxxxx' Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
6cb5f9711e
commit
ea6f355a6b
|
@ -9,9 +9,9 @@ version = 'v'+meson.project_version()
|
||||||
# use git describe if that's available
|
# use git describe if that's available
|
||||||
git = find_program('git', required: false)
|
git = find_program('git', required: false)
|
||||||
if git.found()
|
if git.found()
|
||||||
gitv = run_command('git', 'describe')
|
gitv = run_command('git', 'rev-parse', '--short=5', 'HEAD')
|
||||||
if gitv.returncode() == 0
|
if gitv.returncode() == 0
|
||||||
version = gitv.stdout().strip()
|
version = 'vgit-'+gitv.stdout().strip()
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue