File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 22
33<!-- refer to https://keepachangelog.com/en/1.0.0/ for guidance -->
44
5+ ### Added
6+ - Added DFU Windows driver images.
7+
58## 1.2.1 - 2022-11-08
69
710### Changed
Original file line number Diff line number Diff line change 11#!/usr/bin/env python3
22
3+ from glob import glob
34import json
45import pathlib
56import shutil
2122 "directory" : "npm/images" ,
2223 },
2324 "publishConfig" : {"registry" : "https://registry.npmjs.org" , "access" : "public" },
25+ "exports" : {}, # dynamically filled below
2426}
2527
2628# ensure empty build directory so we don't end up with stale files
3032# copy the hub images
3133for h in HUBS :
3234 shutil .copyfile (IMAGE_DIR / f"icon_{ h } hub.png" , BUILD_DIR / f"hub-{ h } .png" )
35+ package_json ["exports" ][f"./hub-{ h } .png" ] = f"./hub-{ h } .png"
3336
34- # generate package.json file
37+ # copy DFU Windows driver images
38+ for path in glob ("dfu_windows_*" , root_dir = IMAGE_DIR ):
39+ file = pathlib .Path (path ).name
40+ shutil .copyfile (IMAGE_DIR / path , BUILD_DIR / file )
41+ package_json ["exports" ][f"./{ file } " ] = f"./{ file } "
3542
36- # create "exports" item for hub images.
37- package_json ["exports" ] = {f"./hub-{ h } .png" : f"./hub-{ h } .png" for h in HUBS }
43+ # generate package.json file
3844
3945with open (BUILD_DIR / "package.json" , "w" ) as f :
4046 json .dump (package_json , f , indent = 2 )
You can’t perform that action at this time.
0 commit comments