Skip to content

Commit 0cbda86

Browse files
committed
build: handle patch level versioning
Use the patch level identifier from the version string when it is provided instead blindly extending the version string with '.0'. This prevents patch level releases. Signed-off-by: Daniel Wagner <[email protected]>
1 parent 09391da commit 0cbda86

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

meson.build

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,14 @@ project(
2020
]
2121
)
2222

23-
maj_min = meson.project_version().split('-rc')[0]
24-
library_version = maj_min + '.0'
23+
vstr = meson.project_version().split('-rc')[0]
24+
vid = vstr.split('.')
25+
library_version = '.'.join(vid[0], vid[1])
26+
if vid.length() == 3
27+
library_version = '.'.join(library_version, vid[2])
28+
else
29+
library_version = library_version + '.0'
30+
endif
2531

2632
################################################################################
2733
cc = meson.get_compiler('c')

0 commit comments

Comments
 (0)