docs fix versioning (#4189)

This commit is contained in:
Kevin Schlosser 2023-04-29 10:58:03 -06:00 committed by GitHub
parent 2549f23773
commit 2f292c500b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -207,16 +207,18 @@ def get_version():
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)
# d = d.split('#define LVGL_VERSION_PATCH', 1)[-1]
# patch, d = d.split('\n', 1)
ver = '{0}.{1}.{2}'.format(major.strip(), minor.strip(), patch.strip())
ver = '{0}.{1}'.format(major.strip(), minor.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 = '{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
return ver