[console/wip/cdavis/gnome-version-scheme: 11/11] build: use vcs_tag's command parameter rather than run_command




commit 2919d7cb4378d216c826940296c9053e1ccd9fc5
Author: Zander Brown <zbrown gnome org>
Date:   Tue Jan 18 00:47:23 2022 +0000

    build: use vcs_tag's command parameter rather than run_command
    
    Inspired by nautilus's version tagging

 meson.build | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/meson.build b/meson.build
index 4577a4c..2573a6f 100644
--- a/meson.build
+++ b/meson.build
@@ -26,7 +26,7 @@ if get_option('devel')
   app_path = '/org/gnome/Console/Devel/'
   bin_name = 'kgx-devel'
   log_domain = 'KgxDevel'
-  package_version = meson.project_version() + '-@0@'.format(run_command('git', 'rev-parse', '--short', 
'HEAD').stdout().strip())
+  package_version = meson.project_version() + '-@VCS_TAG@'
 else
   app_id = 'org.gnome.Console'
   app_path = '/org/gnome/Console/'
@@ -58,7 +58,10 @@ config_h_in = configure_file(
   output: 'kgx-config.h.in',
   configuration: conf,
 )
-config_h = vcs_tag(input: config_h_in, output: 'kgx-config.h')
+config_h = vcs_tag( input: config_h_in,
+                   output: 'kgx-config.h',
+                  command: ['git', 'rev-parse', '--short', 'HEAD'],
+                 fallback: 'Devel')
 
 gtk_ver = 'GDK_VERSION_3_24'
 glib_ver = 'GLIB_VERSION_2_66'


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