Skip to content

Commit

Permalink
Create config.h and define version, post-release bump
Browse files Browse the repository at this point in the history
  • Loading branch information
andy5995 committed Feb 18, 2024
1 parent 54a6a2b commit f72892c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -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',
Expand All @@ -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(
Expand Down
8 changes: 7 additions & 1 deletion pinner.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 <arch_stanton5995@proton.me>";

plugin->funcs->init = pin_init;
Expand Down

0 comments on commit f72892c

Please sign in to comment.