This is an automated email from the ASF dual-hosted git repository. janc pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-site.git
The following commit(s) were added to refs/heads/master by this push: new f3b77f650a site: update build.py f3b77f650a is described below commit f3b77f650a9be66d4d72d31d33e4e0129eee6aaa Author: Wojciech Pietraszewski <wojciech.pietraszew...@codecoup.pl> AuthorDate: Mon Apr 15 16:07:24 2024 +0200 site: update build.py The build script now checks if 'bsp.exclude_site' has been set in board's bsp.yml, allowing certain boards to be excluded from the 'Supported Boards' section on the mynewt main page. Also, boards are now sorted alphabetically. --- build.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build.py b/build.py index 30105a6b39..e980719142 100755 --- a/build.py +++ b/build.py @@ -66,8 +66,10 @@ def find_BSPs(): for bsp in listdir(bsp_dir): with open(path.join(bsp_dir, bsp, "bsp.yml"), 'r') as f: data = yaml.full_load(f) + if data.get('bsp.exclude_site') == 1: + print("{} has 'exclude_site' set, skipping".format(bsp)) + continue for k in ['bsp.name', 'bsp.url', 'bsp.maker', 'bsp.arch']: - # XXX might also skip bsp.arch that starts with 'sim'? if k not in data: print("{} is missing metadata".format(bsp)) break @@ -75,7 +77,8 @@ def find_BSPs(): bsp = BSP(name=data['bsp.name'], url=data['bsp.url'], maker=data['bsp.maker'], arch=data['bsp.arch']) bsps.append(bsp) - return bsps + bsps_sorted = sorted(bsps, key=lambda bsp: bsp.name.lower()) + return bsps_sorted def build(cwd, site_dir):