mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-03-14 06:49:43 +01:00
build: reject non-matching artifacts
Check for malformed artifact names before dereferencing them.
Fixes: 5816d883ff
Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22385
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
parent
48b8ff890b
commit
1f30a3288d
1 changed files with 3 additions and 2 deletions
|
|
@ -36,8 +36,9 @@ def add_artifact(artifact, prefix="openwrt-"):
|
|||
output[artifact] = {}
|
||||
for file in files:
|
||||
file = str(file.name)
|
||||
arch = re.match(r".*Linux-([^.]*)\.", file).group(1)
|
||||
output[artifact][arch] = file
|
||||
arch = re.match(r".*Linux-([^.]*)\.", file)
|
||||
if arch:
|
||||
output[artifact][arch.group(1)] = file
|
||||
|
||||
|
||||
for json_file in work_dir.glob("*.json"):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue