[gnome-music/wip/jfelder/meson-version-suffix: 9/9] meson: Do not add a version suffix on a default build



commit 76e15e852cfbcc02d08e598b8ce939947e6d52f0
Author: Jean Felder <jfelder src gnome org>
Date:   Tue Aug 14 03:03:51 2018 +0200

    meson: Do not add a version suffix on a default build
    
    The program version is visible in the About Dialog box.
    When built with the default profile, only display the project
    version.
    When built with the development profile, add a suffix (git hash or
    "devel" if the hash cannot be retrieved).

 data/meson.build | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index 23e0c7e6..926b3aab 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -1,18 +1,18 @@
 # Compiling the resources
 VCS_TAG = ''
-git = find_program('git', required : false)
-if git.found()
-  VCS_TAG = run_command('git', 'rev-parse', '--short', 'HEAD').stdout().strip()
-endif
-if VCS_TAG == ''
-  if get_option('profile') != 'default'
-    VCS_TAG = 'devel'
+if get_option('profile') != 'default'
+  git = find_program('git', required : false)
+  if git.found()
+    VCS_TAG = run_command('git', 'rev-parse', '--short', 'HEAD').stdout().strip()
+  endif
+  if VCS_TAG == ''
+    VCS_TAG = '-devel'
   else
-    VCS_TAG = 'stable'
+    VCS_TAG = '-@0@'.format(VCS_TAG)
   endif
 endif
 about_dialog_conf = configuration_data()
-about_dialog_conf.set('PACKAGE_VERSION', '@0@-@1@'.format(meson.project_version(), VCS_TAG))
+about_dialog_conf.set('PACKAGE_VERSION', '@0@@1@'.format(meson.project_version(), VCS_TAG))
 about_dialog_conf.set('PACKAGE_URL', PACKAGE_URL)
 about_dialog_conf.set('PROGRAM_NAME', 'Music' + NAME_SUFFIX)
 about_dialog_conf.set('APPID', APPLICATION_ID)


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