[gnome-notes] Show git tag in version
- From: Isaque Galdino de Araujo <igaldino src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-notes] Show git tag in version
- Date: Fri, 23 Apr 2021 12:22:31 +0000 (UTC)
commit 8eeea241b14d6787caa54278a18155efa178137e
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date: Tue Apr 20 18:37:38 2021 +0530
Show git tag in version
src/bjb-application.c | 3 ++-
src/meson.build | 6 ++++++
src/version.h.in | 26 ++++++++++++++++++++++++++
3 files changed, 34 insertions(+), 1 deletion(-)
---
diff --git a/src/bjb-application.c b/src/bjb-application.c
index c4910cb..0c97b3b 100644
--- a/src/bjb-application.c
+++ b/src/bjb-application.c
@@ -21,6 +21,7 @@
#define G_LOG_DOMAIN "bjb-application"
#include "config.h"
+#include "version.h"
#include <glib/gi18n.h>
#include <libbiji/libbiji.h>
@@ -192,7 +193,7 @@ bijiben_handle_local_options (GApplication *application,
{
if (g_variant_dict_contains (options, "version"))
{
- g_print ("%s %s\n", _("GNOME Notes"), VERSION);
+ g_print ("%s %s\n", _("GNOME Notes"), PACKAGE_VCS_VERSION);
return 0;
}
diff --git a/src/meson.build b/src/meson.build
index fb7b860..7e007e2 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,3 +1,9 @@
+revision_tag = vcs_tag(
+ input: 'version.h.in',
+ output: 'version.h',
+)
+bijiben_deps += declare_dependency(sources: revision_tag)
+
subdir('libbiji')
sources = files(
diff --git a/src/version.h.in b/src/version.h.in
new file mode 100644
index 0000000..14b1948
--- /dev/null
+++ b/src/version.h.in
@@ -0,0 +1,26 @@
+/* version.h.in
+ *
+ * Copyright 2021 Mohammed Sadiq <sadiq sadiqpk org>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Authors:
+ * Mohammed Sadiq <sadiq sadiqpk org>
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#pragma once
+
+#define PACKAGE_VCS_VERSION "@VCS_TAG@"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]