[geary/cherry-pick-96183f07] Merge branch 'settable-revno' into 'mainline'



commit 6ef132278864c784e0fe0f1e41d95df34f3363ff
Author: Michael Gratton <mike vee net>
Date:   Mon Mar 30 04:44:23 2020 +0000

    Merge branch 'settable-revno' into 'mainline'
    
    Allow explicit setting of revision string
    
    See merge request GNOME/geary!471
    
    (cherry picked from commit 96183f076b24e4ca90972321c7cba192911b0434)
    
    43b52137 Allow explicit setting of revision string

 meson.build       | 5 ++++-
 meson_options.txt | 5 +++++
 2 files changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index 4cc951ef..9417ef83 100644
--- a/meson.build
+++ b/meson.build
@@ -127,7 +127,10 @@ libmessagingmenu_dep = dependency('messaging-menu', version: '>= 12.10', require
 # Build variables
 geary_id = 'org.gnome.Geary@0@'.format(profile)
 geary_version = meson.project_version()
-revno = run_command('build-aux/git_version.py').stdout().strip()
+revno = get_option('revno')
+if revno == ''
+  revno = run_command('build-aux/git_version.py').stdout().strip()
+endif
 
 gnome = import('gnome')
 i18n = import('i18n')
diff --git a/meson_options.txt b/meson_options.txt
index 043f3142..5f7f7608 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -58,3 +58,8 @@ option(
   value: false,
   description: 'Whether to use explicit reference tracking.'
 )
+option(
+  'revno',
+  type: 'string',
+  description: 'Custom revision string (default extracted from "git describe")'
+)


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