From 649cdc14ba1f352c14179bd177f6156bd322cbed Mon Sep 17 00:00:00 2001 From: Dundar Goc Date: Mon, 2 May 2022 10:58:40 +0200 Subject: ci(gen_vimdoc): handle edge case when checking doxygen version When checking the version of the doxygen installed from conda the output has the following format: 1.9.2 (ee54ebd4f0ad83d9c44f19a459146de64d0ffba2*) This would cause an error in the "Missing API docs" CI job. This fix will correctly parse the doxygen version for both stable releases ("1.9.2") as well as the version with the git commit hash attached. --- scripts/gen_vimdoc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/gen_vimdoc.py') diff --git a/scripts/gen_vimdoc.py b/scripts/gen_vimdoc.py index 8d38382405..101f0cf5ff 100755 --- a/scripts/gen_vimdoc.py +++ b/scripts/gen_vimdoc.py @@ -60,7 +60,7 @@ if sys.version_info < MIN_PYTHON_VERSION: sys.exit(1) doxygen_version = tuple([int(i) for i in subprocess.check_output(["doxygen", "-v"], - universal_newlines=True).split('.')]) + universal_newlines=True).split()[0].split('.')]) if doxygen_version < MIN_DOXYGEN_VERSION: print("requires Doxygen {}.{}.{}+".format(*MIN_DOXYGEN_VERSION)) -- cgit From 59162584b1d03e7739afb5116ad96e2c16c7b271 Mon Sep 17 00:00:00 2001 From: Dundar Goc Date: Mon, 2 May 2022 11:14:34 +0200 Subject: build(gen_vimdoc): print user's doxygen version if it's too old @theHamsta suggested in https://github.com/neovim/neovim/pull/18348#discussion_r862594173 to also print the users doxygen version if the version is too old. --- scripts/gen_vimdoc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts/gen_vimdoc.py') diff --git a/scripts/gen_vimdoc.py b/scripts/gen_vimdoc.py index 101f0cf5ff..57b46a381e 100755 --- a/scripts/gen_vimdoc.py +++ b/scripts/gen_vimdoc.py @@ -63,7 +63,8 @@ doxygen_version = tuple([int(i) for i in subprocess.check_output(["doxygen", "-v universal_newlines=True).split()[0].split('.')]) if doxygen_version < MIN_DOXYGEN_VERSION: - print("requires Doxygen {}.{}.{}+".format(*MIN_DOXYGEN_VERSION)) + print("\nRequires doxygen {}.{}.{}+".format(*MIN_DOXYGEN_VERSION)) + print("Your doxygen version is {}.{}.{}\n".format(*doxygen_version)) sys.exit(1) # DEBUG = ('DEBUG' in os.environ) -- cgit