doc: add repitition qualifier to version regexs
Currently the libuv version is reported as unknown on the website. This is because the UV_VERSION_MINOR is no longer a single digit and the regex is not getting a match for the minor number. This commit makes the version regexs capture multiple digit numbers. PR-URL: https://github.com/libuv/libuv/pull/1205 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
This commit is contained in:
parent
011e02e3e5
commit
c722b8d278
@ -21,11 +21,11 @@ def get_libuv_version():
|
||||
with open('../../include/uv-version.h') as f:
|
||||
data = f.read()
|
||||
try:
|
||||
m = re.search(r"""^#define UV_VERSION_MAJOR (\d)$""", data, re.MULTILINE)
|
||||
m = re.search(r"""^#define UV_VERSION_MAJOR (\d+)$""", data, re.MULTILINE)
|
||||
major = int(m.group(1))
|
||||
m = re.search(r"""^#define UV_VERSION_MINOR (\d)$""", data, re.MULTILINE)
|
||||
m = re.search(r"""^#define UV_VERSION_MINOR (\d+)$""", data, re.MULTILINE)
|
||||
minor = int(m.group(1))
|
||||
m = re.search(r"""^#define UV_VERSION_PATCH (\d)$""", data, re.MULTILINE)
|
||||
m = re.search(r"""^#define UV_VERSION_PATCH (\d+)$""", data, re.MULTILINE)
|
||||
patch = int(m.group(1))
|
||||
m = re.search(r"""^#define UV_VERSION_IS_RELEASE (\d)$""", data, re.MULTILINE)
|
||||
is_release = int(m.group(1))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user