mirror of
https://github.com/ETLCPP/etl.git
synced 2026-04-30 19:09:10 +08:00
Add PURL to Zephyr module.yml for SBoM generation (#1344)
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
This commit is contained in:
parent
78d8b82afb
commit
ad6e027b08
@ -129,6 +129,29 @@ def update_library_properties(filename):
|
|||||||
f.write(line)
|
f.write(line)
|
||||||
f.write('\n')
|
f.write('\n')
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
def update_zephyr_module():
|
||||||
|
print('')
|
||||||
|
print('Updating zephyr/module.yml')
|
||||||
|
|
||||||
|
zephyr_module = os.path.join(etl_dir, 'zephyr', 'module.yml')
|
||||||
|
|
||||||
|
with open(zephyr_module, 'r') as f:
|
||||||
|
text = f.read().splitlines()
|
||||||
|
|
||||||
|
search_purl = 'pkg:github/ETLCPP/etl@'
|
||||||
|
|
||||||
|
for i in range(len(text)):
|
||||||
|
if search_purl in text[i]:
|
||||||
|
idx = text[i].find(search_purl)
|
||||||
|
text[i] = text[i][:idx] + search_purl + full_version
|
||||||
|
print(text[i])
|
||||||
|
|
||||||
|
with open(zephyr_module, 'w') as f:
|
||||||
|
for line in text:
|
||||||
|
f.write(line)
|
||||||
|
f.write('\n')
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
def update_versions():
|
def update_versions():
|
||||||
print('')
|
print('')
|
||||||
@ -149,6 +172,8 @@ def update_versions():
|
|||||||
|
|
||||||
update_library_properties(os.path.join(etl_dir, 'library.properties'))
|
update_library_properties(os.path.join(etl_dir, 'library.properties'))
|
||||||
|
|
||||||
|
update_zephyr_module()
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
update_versions()
|
update_versions()
|
||||||
|
|||||||
@ -2,3 +2,6 @@ name: etl
|
|||||||
build:
|
build:
|
||||||
cmake: zephyr
|
cmake: zephyr
|
||||||
kconfig: zephyr/Kconfig
|
kconfig: zephyr/Kconfig
|
||||||
|
security:
|
||||||
|
external-references:
|
||||||
|
- pkg:github/ETLCPP/etl@20.46.2
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user