From ea6f355a6b49871effae9a20419805f5fbe5932a Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Tue, 30 Jul 2019 22:22:21 +0100 Subject: [PATCH] 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 --- meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 96deb32f..dd067b0e 100644 --- a/meson.build +++ b/meson.build @@ -9,9 +9,9 @@ version = 'v'+meson.project_version() # use git describe if that's available git = find_program('git', required: false) if git.found() - gitv = run_command('git', 'describe') + gitv = run_command('git', 'rev-parse', '--short=5', 'HEAD') if gitv.returncode() == 0 - version = gitv.stdout().strip() + version = 'vgit-'+gitv.stdout().strip() endif endif