[gnome-builder] build: push further into "41.x" territory



commit b68dbc98479b9ab7b922d39c81430ebbb3c8ad91
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jul 7 18:29:02 2021 -0700

    build: push further into "41.x" territory
    
    We want to be able to drop the semantic versioning this cycle. This is the
    first step. We still need to be able to drop the micro versions everywhere
    and I'd like to reset all our "available" macros to _IN_ALL as we start
    the new numbering sequence.

 meson.build                              | 23 ++++++++++-------------
 src/libide/core/ide-version.h.in         | 13 ++++---------
 src/libide/core/meson.build              |  1 -
 src/libide/gui/ide-application-actions.c |  6 ++----
 src/libide/gui/ide-application-plugins.c |  3 +--
 src/libide/meson.build                   |  2 +-
 6 files changed, 18 insertions(+), 30 deletions(-)
---
diff --git a/meson.build b/meson.build
index c72888a2e..a62fef61d 100644
--- a/meson.build
+++ b/meson.build
@@ -1,6 +1,6 @@
 project('gnome-builder', 'c',
           license: 'GPL3+',
-          version: '41.0.0',
+          version: '41.alpha0',
     meson_version: '>= 0.54.0',
   default_options: [ 'c_std=gnu11',
                      'cpp_std=gnu++2a',
@@ -9,14 +9,10 @@ project('gnome-builder', 'c',
                    ],
 )
 
-symbolic_release = '41.alpha'
-
 version_split = meson.project_version().split('.')
 MAJOR_VERSION = version_split[0]
-MINOR_VERSION = version_split[1]
-MICRO_VERSION = version_split[2]
 
-libide_api_version = '@0@.@1@'.format(MAJOR_VERSION, MINOR_VERSION)
+libide_api_version = '@0@.0'.format(MAJOR_VERSION)
 
 pkgdocdir_abs = join_paths(get_option('prefix'), get_option('datadir'), 'doc', 'gnome-builder')
 pkglibdir_abs = join_paths(get_option('prefix'), get_option('libdir'), 'gnome-builder')
@@ -65,14 +61,20 @@ status = [
   '', '',
 ]
 
+config_h = configuration_data()
+
 # Message of doom
-if (version_split[1].to_int() % 2 == 1)
+if (version_split[1][0] == 'a' or version_split[1][0] == 'b')
+  config_h.set10('DEVELOPMENT_BUILD', 1)
+  MINOR_VERSION = 0
   status += [
-    'You are building a debug version of GNOME builder. There may be more',
+    'You are building a development version of GNOME builder. There may be more',
     'bugs in this version that you are comfortable with. Addtionally, there',
     'is a chance it will eat all of your work and leave you sad and alone.',
     '', ''
   ]
+else
+  MINOR_VERSION = version_split[1].to_int()
 endif
 
 status += [
@@ -93,8 +95,6 @@ status += [
   '', ''
 ]
 
-config_h = configuration_data()
-config_h.set_quoted('SYMBOLIC_RELEASE', symbolic_release)
 config_h.set_quoted('PACKAGE_NAME', 'gnome-builder')
 config_h.set_quoted('PACKAGE_ABI_S', libide_api_version)
 config_h.set('PACKAGE_ABI', libide_api_version)
@@ -113,9 +113,6 @@ config_h.set('LOCALEDIR', 'PACKAGE_LOCALE_DIR')
 
 config_h.set10('ENABLE_NLS', true) # Always enabled
 
-# Development build setup
-config_h.set('DEVELOPMENT_BUILD', version_split[1].to_int().is_odd())
-
 # We should probably avoid using these
 config_h.set_quoted('SRCDIR', meson.source_root())
 config_h.set_quoted('BUILDDIR', meson.build_root())
diff --git a/src/libide/core/ide-version.h.in b/src/libide/core/ide-version.h.in
index f75082861..238307921 100644
--- a/src/libide/core/ide-version.h.in
+++ b/src/libide/core/ide-version.h.in
@@ -61,13 +61,6 @@
  */
 #define IDE_MINOR_VERSION (@MINOR_VERSION@)
 
-/**
- * IDE_MICRO_VERSION:
- *
- * libide micro version component (e.g. 3 if %IDE_VERSION is 1.2.3)
- */
-#define IDE_MICRO_VERSION (@MICRO_VERSION@)
-
 /**
  * IDE_VERSION
  *
@@ -93,7 +86,7 @@
  * integer comparisons.
  */
 #define IDE_VERSION_HEX \
-        (IDE_ENCODE_VERSION (IDE_MAJOR_VERSION, IDE_MINOR_VERSION, IDE_MICRO_VERSION))
+        (IDE_ENCODE_VERSION (IDE_MAJOR_VERSION, IDE_MINOR_VERSION, 0))
 
 /**
  * IDE_CHECK_VERSION:
@@ -103,11 +96,13 @@
  *
  * Compile-time version checking. Evaluates to %TRUE if the version
  * of libide is greater than the required one.
+ *
+ * Micro is no longer used.
  */
 #define IDE_CHECK_VERSION(major,minor,micro)   \
         (IDE_MAJOR_VERSION > (major) || \
          (IDE_MAJOR_VERSION == (major) && IDE_MINOR_VERSION > (minor)) || \
          (IDE_MAJOR_VERSION == (major) && IDE_MINOR_VERSION == (minor) && \
-          IDE_MICRO_VERSION >= (micro)))
+          0 >= (micro)))
 
 #endif /* IDE_VERSION_H */
diff --git a/src/libide/core/meson.build b/src/libide/core/meson.build
index bb75cbf26..d4ebbf1a8 100644
--- a/src/libide/core/meson.build
+++ b/src/libide/core/meson.build
@@ -9,7 +9,6 @@ libide_include_directories += include_directories('.')
 version_data = configuration_data()
 version_data.set('MAJOR_VERSION', MAJOR_VERSION)
 version_data.set('MINOR_VERSION', MINOR_VERSION)
-version_data.set('MICRO_VERSION', MICRO_VERSION)
 version_data.set('VERSION', meson.project_version())
 version_data.set_quoted('BUILD_CHANNEL', get_option('channel'))
 version_data.set_quoted('BUILD_TYPE', get_option('buildtype'))
diff --git a/src/libide/gui/ide-application-actions.c b/src/libide/gui/ide-application-actions.c
index 7fdc7cf3b..36b87308f 100644
--- a/src/libide/gui/ide-application-actions.c
+++ b/src/libide/gui/ide-application-actions.c
@@ -127,12 +127,10 @@ ide_application_actions_about (GSimpleAction *action,
         }
     }
 
-  version = g_string_new (SYMBOLIC_RELEASE);
+  version = g_string_new (PACKAGE_VERSION);
 
   if (!g_str_equal (IDE_BUILD_TYPE, "release"))
-    g_string_append (version, "\n(" IDE_BUILD_IDENTIFIER ")");
-  else
-    g_string_append (version, "\n(" PACKAGE_VERSION ")");
+    g_string_append (version, " (" IDE_BUILD_IDENTIFIER ")");
 
   if (g_strcmp0 (IDE_BUILD_CHANNEL, "other") != 0)
     g_string_append (version, "\n" IDE_BUILD_CHANNEL);
diff --git a/src/libide/gui/ide-application-plugins.c b/src/libide/gui/ide-application-plugins.c
index 4a410fbeb..aea398976 100644
--- a/src/libide/gui/ide-application-plugins.c
+++ b/src/libide/gui/ide-application-plugins.c
@@ -151,8 +151,7 @@ ide_application_can_load_plugin (IdeApplication *self,
           return FALSE;
         }
 
-      if (!g_str_has_prefix (IDE_VERSION_S, abi) ||
-          IDE_VERSION_S [strlen (abi)] != '.')
+      if (g_strcmp0 (PACKAGE_ABI_S, abi) != 0)
         {
           g_critical ("Refusing to load plugin %s, expected ABI %d.%d and got %s",
                       module_name, IDE_MAJOR_VERSION, IDE_MINOR_VERSION, abi);
diff --git a/src/libide/meson.build b/src/libide/meson.build
index 7f5dff4f2..49499430f 100644
--- a/src/libide/meson.build
+++ b/src/libide/meson.build
@@ -1,4 +1,4 @@
-libide_header_subdir = join_paths('gnome-builder-@0@.@1@'.format(MAJOR_VERSION, MINOR_VERSION), 'libide')
+libide_header_subdir = join_paths('gnome-builder-@0@'.format(MAJOR_VERSION), 'libide')
 libide_header_dir = join_paths(get_option('includedir'), libide_header_subdir)
 libide_include_directories = []
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]