Use single place to define the version and increase version to 3.17.0 (#932)
authorBernd Schubert <bschubert@ddn.com>
Mon, 22 Apr 2024 10:05:39 +0000 (12:05 +0200)
committerGitHub <noreply@github.com>
Mon, 22 Apr 2024 10:05:39 +0000 (12:05 +0200)
* Use single place to define the version

Defining the version in fuse_common.h, is removed, it is defined
through meson and provided by "libfuse_config.h". I.e. it avoids
to define the version twice - once in meson and once in
fuse_common.h.

Ideal would be to set integers in the meson file and create the version
string from these integers. However, meson requires that "project"
is the first meson.build keyword - with that it requires to
set the version from a string and then major/minor/hotfix integers
are created from string split.

Signed-off-by: Bernd Schubert <bernd.schubert@fastmail.fm>
* Increase the version to 3.17.0

This is to prepare the branch for the next release.

Signed-off-by: Bernd Schubert <bernd.schubert@fastmail.fm>
---------

Signed-off-by: Bernd Schubert <bernd.schubert@fastmail.fm>
include/fuse_common.h
meson.build

index 6a060fd989329f90aa000ea0030b911902fea337..4efa53dac11366104f7dade54c4321de8eed1bba 100644 (file)
 #include <stdint.h>
 #include <sys/types.h>
 
-/** Major version of FUSE library interface */
-#define FUSE_MAJOR_VERSION 3
-
-/** Minor version of FUSE library interface */
-#define FUSE_MINOR_VERSION 16
-
 #define FUSE_MAKE_VERSION(maj, min)  ((maj) * 100 + (min))
 #define FUSE_VERSION FUSE_MAKE_VERSION(FUSE_MAJOR_VERSION, FUSE_MINOR_VERSION)
 
index 7d8db7f4a6e5edf3b0dc1a16ccce73443cd6a931..4a0d268774f5d5cf39ae368eab12fac76f9b841b 100644 (file)
@@ -1,4 +1,4 @@
-project('libfuse3', ['c'], version: '3.16.2',
+project('libfuse3', ['c'], version: '3.17.0',
         meson_version: '>= 0.51',
         default_options: [
             'buildtype=debugoptimized',
@@ -6,6 +6,14 @@ project('libfuse3', ['c'], version: '3.16.2',
             'warning_level=2',
         ])
 
+# Would be better to create the version string
+# from integers, i.e. concatenating strings instead
+# of splitting a string, but 'project' needs to be
+# the first meson.build keyword...
+version_list = meson.project_version().split('.')
+FUSE_MAJOR_VERSION = version_list[0]
+FUSE_MINOR_VERSION = version_list[1]
+FUSE_HOTFIX_VERSION = version_list[2]
 
 platform = host_machine.system()
 if platform == 'darwin'
@@ -34,6 +42,10 @@ private_cfg = configuration_data()
 #
 public_cfg = configuration_data()
 
+public_cfg.set('FUSE_MAJOR_VERSION', FUSE_MAJOR_VERSION)
+public_cfg.set('FUSE_MINOR_VERSION', FUSE_MINOR_VERSION)
+public_cfg.set('FUSE_HOTFIX_VERSION', FUSE_HOTFIX_VERSION)
+
 # Default includes when checking for presence of functions and
 # struct members
 include_default = '''