scripts: build: fix splitting of targets

This commit is contained in:
Markus Küffner
2024-11-12 08:36:17 +01:00
committed by GitHub
parent 9ef0e9df1a
commit 57a1e1dc98

View File

@@ -83,7 +83,7 @@ with open(dockerfile) as file:
target = re.findall(r'FROM .* AS .*', line)
if target:
if not "build" in target[0]:
build["targets"].append(target[0].split(' as ')[-1])
build["targets"].append(target[0].split(' AS ')[-1])
if args.upstream:
logger.warning("Upstream Repo has been overwritten to: " + args.upstream )
@@ -180,4 +180,4 @@ for version in build["versions"].keys():
logger.info("Build Summary: " + str(build["summary"]))
if len(build["summary"]["failure"]) > 0:
sys.exit(1)
sys.exit(1)