From 5c2036232810a90af0b9fb70425ed7b245b0687e Mon Sep 17 00:00:00 2001 From: Bruce Cowan <bruce.cowan@strath.ac.uk> Date: Fri, 3 Jan 2020 19:49:25 +0000 Subject: [PATCH] Better VCS tagging logic --- src/meson.build | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/meson.build b/src/meson.build index 2af67ee..6a3b7bc 100644 --- a/src/meson.build +++ b/src/meson.build @@ -13,8 +13,9 @@ COPYRIGHT_YEAR = '?' git = find_program('git', required: false) if git.found() - VCS_TAG = run_command('git', 'rev-parse', '--short', 'HEAD').stdout().strip() - COPYRIGHT_YEAR = run_command('git', 'log', '-1', '--format=%cd', '--date=format:%Y').stdout().strip() + VCS_TAG = run_command('git', 'describe', '--always').stdout().strip() +else + VCS_TAG = 'unknown' endif conf.set_quoted('PACKAGE_VERSION', VCS_TAG) -- GitLab