From 5894d538409106e34181c78891ea07c923a2abd7 Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Thu, 25 Apr 2024 04:39:59 -0400 Subject: [PATCH] fix(docs): use find_version helper in build script (#6122) --- docs/build.py | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/docs/build.py b/docs/build.py index 1d1efab63..c919662cc 100755 --- a/docs/build.py +++ b/docs/build.py @@ -207,27 +207,7 @@ else: def get_version(): - path = os.path.join(project_path, 'lvgl.h') - with open(path, 'rb') as f: - d = f.read().decode('utf-8') - - d = d.split('#define LVGL_VERSION_MAJOR', 1)[-1] - major, d = d.split('\n', 1) - d = d.split('#define LVGL_VERSION_MINOR', 1)[-1] - minor, d = d.split('\n', 1) - # d = d.split('#define LVGL_VERSION_PATCH', 1)[-1] - # patch, d = d.split('\n', 1) - - ver = '{0}.{1}'.format(major.strip(), minor.strip()) - - # ver = '{0}.{1}.{2}'.format(major.strip(), minor.strip(), patch.strip()) - - # if '#define LVGL_VERSION_INFO' in d: - # d = d.split('#define LVGL_VERSION_INFO', 1)[-1] - # info, d = d.split('\n', 1) - # info = info.strip().replace('"', '') - # ver += '-' + info - + _, ver = subprocess.getstatusoutput("../scripts/find_version.sh") return ver cmd('sphinx-build -b html "{src}" "{dst}" -D version="{version}" -E -j {cpu}'.format(