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
This commit is contained in:
parent
7bac1d02f7
commit
ae8bbbd87d
@ -129,6 +129,29 @@ def update_library_properties(filename):
|
||||
f.write(line)
|
||||
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():
|
||||
print('')
|
||||
@ -149,6 +172,8 @@ def update_versions():
|
||||
|
||||
update_library_properties(os.path.join(etl_dir, 'library.properties'))
|
||||
|
||||
update_zephyr_module()
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
if __name__ == "__main__":
|
||||
update_versions()
|
||||
|
||||
@ -2,3 +2,6 @@ name: etl
|
||||
build:
|
||||
cmake: zephyr
|
||||
kconfig: zephyr/Kconfig
|
||||
security:
|
||||
external-references:
|
||||
- pkg:github/ETLCPP/etl@20.46.2
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user