[geary: 1/2] Allow explicit setting of revision string
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary: 1/2] Allow explicit setting of revision string
- Date: Mon, 30 Mar 2020 04:44:37 +0000 (UTC)
commit 43b52137999bf0db923c8a9a20e28d85ba17affa
Author: Daniel Kahn Gillmor <dkg fifthhorseman net>
Date: Sun Mar 29 23:53:24 2020 -0400
Allow explicit setting of revision string
This lets a packager ensure that the binary object built from an
unpacked source tarball is identical to the binary object created from
a live git tree.
I hope to use it in debian with something like -Drevno=debian/3.36.1-1
during the meson configuration, so that the help dialog box and the
bug reporting logs can identify the specific build.
Signed-off-by: Daniel Kahn Gillmor <dkg fifthhorseman net>
meson.build | 5 ++++-
meson_options.txt | 5 +++++
2 files changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index 6a5bb77d..0f79826f 100644
--- a/meson.build
+++ b/meson.build
@@ -129,7 +129,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]