Skip to content

Commit

Permalink
Bump version and add version validation
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Jul 4, 2024
1 parent e50c8b6 commit 503e183
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/fmt/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down Expand Up @@ -262,7 +262,7 @@
#ifndef FMT_BEGIN_NAMESPACE
# define FMT_BEGIN_NAMESPACE \
namespace fmt { \
inline namespace v10 {
inline namespace v11 {
# define FMT_END_NAMESPACE \
} \
}
Expand Down
10 changes: 10 additions & 0 deletions support/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <br>.
changes = ''
code_block = False
Expand Down

0 comments on commit 503e183

Please sign in to comment.