diff --git a/src/meson.build b/src/meson.build index 2af67eeac8021f98d0ee4d77346a8e5600c78ef8..6a3b7bcad4147a96f98f974332315f5a61b24c4e 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)