[gnome-todo/wip/sadiq/fixes: 3/3] build: Simplify setting version from git tag
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo/wip/sadiq/fixes: 3/3] build: Simplify setting version from git tag
- Date: Sun, 2 Sep 2018 02:24:18 +0000 (UTC)
commit cef94b4459fed5d064227413ed1c96b0b8a759f0
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date: Sat Sep 1 21:02:47 2018 +0530
build: Simplify setting version from git tag
meson.build | 12 ++++++++++--
src/gtd-application.c | 3 +--
src/gtd-vcs-identifier.h.in | 37 -------------------------------------
src/meson.build | 11 -----------
4 files changed, 11 insertions(+), 52 deletions(-)
---
diff --git a/meson.build b/meson.build
index a674e96..05b08ed 100644
--- a/meson.build
+++ b/meson.build
@@ -61,8 +61,8 @@ set_defines = [
['PACKAGE_STRING', '@0@ @1@'.format(meson.project_name(), gnome_todo_version)],
['PACKAGE_TARNAME', meson.project_name()],
['PACKAGE_URL', 'https://wiki.gnome.org/Apps/Todo'],
- ['PACKAGE_VERSION', gnome_todo_version],
- ['VERSION', gnome_todo_version],
+ ['PACKAGE_VERSION', '@VCS_TAG@'],
+ ['VERSION', '@VCS_TAG@'],
# i18n
['GETTEXT_PACKAGE', meson.project_name()]
]
@@ -143,6 +143,14 @@ gnome_todo_deps = [
cc.find_library('m', required: true)
]
+vcs_identifier_h = vcs_tag(
+ input: configure_file(
+ output: 'config.h.in',
+ configuration: config_h
+ ),
+ output: 'config.h',
+)
+
configure_file(
output: 'config.h',
configuration: config_h
diff --git a/src/gtd-application.c b/src/gtd-application.c
index b482734..62530ce 100644
--- a/src/gtd-application.c
+++ b/src/gtd-application.c
@@ -27,7 +27,6 @@
#include "gtd-manager.h"
#include "gtd-manager-protected.h"
#include "gtd-plugin-dialog.h"
-#include "gtd-vcs-identifier.h"
#include "gtd-window.h"
#include "gtd-window-private.h"
@@ -155,7 +154,7 @@ gtd_application_show_about (GSimpleAction *simple,
gtk_show_about_dialog (GTK_WINDOW (self->window),
"program-name", _("To Do"),
- "version", VERSION GTD_VCS_IDENTIFIER,
+ "version", VERSION,
"copyright", copyright,
"license-type", GTK_LICENSE_GPL_3_0,
"authors", authors,
diff --git a/src/meson.build b/src/meson.build
index 7656150..3703d29 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,15 +1,4 @@
-##################
-# VCS Identifier #
-##################
-
-vcs_identifier_h = vcs_tag(
- fallback: meson.project_version(),
- input: 'gtd-vcs-identifier.h.in',
- output: 'gtd-vcs-identifier.h',
-)
-
-
################
# Header files #
################
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]