From 503e183b9e3284317e5c12ebbf1747b54de33008 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Thu, 4 Jul 2024 07:49:58 -0700 Subject: [PATCH] Bump version and add version validation --- include/fmt/base.h | 4 ++-- support/manage.py | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/include/fmt/base.h b/include/fmt/base.h index 783e0368..f440cffd 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -23,7 +23,7 @@ #endif // The fmt library version in the form major * 10000 + minor * 100 + patch. -#define FMT_VERSION 110000 +#define FMT_VERSION 110001 // Detect compiler versions. #if defined(__clang__) && !defined(__ibmxl__) @@ -262,7 +262,7 @@ #ifndef FMT_BEGIN_NAMESPACE # define FMT_BEGIN_NAMESPACE \ namespace fmt { \ - inline namespace v10 { + inline namespace v11 { # define FMT_END_NAMESPACE \ } \ } diff --git a/support/manage.py b/support/manage.py index ae5252fc..928affe2 100755 --- a/support/manage.py +++ b/support/manage.py @@ -144,6 +144,16 @@ def release(args): if first_section[0] == '\n': first_section.pop(0) + ns_version = None + for line in fileinput.input(os.path.join(fmt_repo.dir, 'base.h')): + m = re.match(r'inline namespace v(.*)', line) + if m: + ns_version = m.group(1) + break + major_version = version.split('.')[0] + if not ns_version or ns_version != major_version: + raise Exception(f'Version mismatch {ns_version} != {major_version}') + # Workaround GitHub-flavored Markdown treating newlines as
. changes = '' code_block = False