[seahorse/wip/sadiq/version] build: Show a more precise version when built from git



commit 16254fabdaaf3a87b84d9525515b4bf22b21792c
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date:   Sat Sep 1 11:42:09 2018 +0530

    build: Show a more precise version when built from git

 meson.build | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/meson.build b/meson.build
index d21907a3..b29decdc 100644
--- a/meson.build
+++ b/meson.build
@@ -130,10 +130,10 @@ add_project_arguments(supported_warning_flags,
 # configuration
 conf = configuration_data()
 
-conf.set_quoted('VERSION', meson.project_version())
+conf.set_quoted('VERSION', '@VCS_TAG@')
 conf.set_quoted('PACKAGE', meson.project_name())
 conf.set_quoted('PACKAGE_NAME', meson.project_name())
-conf.set_quoted('PACKAGE_VERSION', meson.project_version())
+conf.set_quoted('PACKAGE_VERSION', '@VCS_TAG@')
 conf.set_quoted('PACKAGE_STRING', '@0@ @1@'.format(meson.project_name(), meson.project_version()))
 conf.set_quoted('PKGDATADIR', pkgdatadir)
 conf.set_quoted('EXECDIR', libexecbindir)
@@ -160,6 +160,14 @@ if with_pgp
   conf.set('GPG_MICRO', gpg_version_split[2])
 endif
 
+vcs_tag(
+  input: configure_file(
+    output: 'config.h.in',
+    configuration: conf
+  ),
+  output: 'config.h'
+)
+
 config_file = configure_file(
   output: 'config.h',
   configuration: conf,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]