From f72892cf8a5ac70247bda520f1b838ca1573b5c4 Mon Sep 17 00:00:00 2001 From: andy5995 Date: Sun, 18 Feb 2024 15:48:14 -0600 Subject: [PATCH] Create config.h and define version, post-release bump --- meson.build | 6 +++++- pinner.c | 8 +++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 23e7109..8d23899 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project( 'pinner', ['c'], - version: '0.1.0', + version: '0.1.1.999', meson_version : '>= 0.50.0', default_options: [ 'warning_level=2', @@ -25,6 +25,10 @@ platform_is_windows = (host_sys == 'windows') add_project_arguments(cc.get_supported_arguments(extra_flags), language: 'c') +conf = configuration_data() +conf.set_quoted('PINNER_VERSION', meson.project_version()) +config_h = configure_file(output : 'config.h', configuration : conf) + geany_dep = dependency('geany') shared_module( diff --git a/pinner.c b/pinner.c index 43fed0e..9c9005a 100644 --- a/pinner.c +++ b/pinner.c @@ -32,6 +32,12 @@ enum DO_UNPIN }; +#ifdef PINNER_VERSION +#include "config" +#else +#define PINNER_VERSION "git" +#endif + static void destroy_widget(gpointer pdata); static void @@ -352,7 +358,7 @@ geany_load_module(GeanyPlugin* plugin) { plugin->info->name = "Pinner"; plugin->info->description = "Pin a document"; - plugin->info->version = "0.1.0"; + plugin->info->version = PINNER_VERSION; plugin->info->author = "Andy Alt "; plugin->funcs->init = pin_init;