From c722b8d2784c8a9f99c810c0263e6833e480ec7b Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Fri, 20 Jan 2017 14:05:42 +0100 Subject: [PATCH] doc: add repitition qualifier to version regexs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Saúl Ibarra Corretgé --- docs/src/conf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/src/conf.py b/docs/src/conf.py index b9eaa137..3f8689d2 100644 --- a/docs/src/conf.py +++ b/docs/src/conf.py @@ -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))