Skip to content

Commit

Permalink
apps: Add shortlist field to target only if set
Browse files Browse the repository at this point in the history
Don't set `shortlist` field in the custom.fetched-apps.shortlist field
of a target if the shortlist attribute is not defined in
`preloaded_images` nor in `fetched-apps` fields of a factory config.

Signed-off-by: Mike Sul <[email protected]>
  • Loading branch information
mike-sul committed May 24, 2024
1 parent 5cfb4bc commit 4de7e92
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ def main(args: argparse.Namespace):
tar_fetched_apps(os.path.join(args.fetch_dir, target), out_file)
target_json["custom"]["fetched-apps"] = {
"uri": os.path.join(os.environ["H_RUN_URL"], f"{target}.apps.tar"),
"shortlist": args.apps_shortlist,
}
if args.apps_shortlist:
target_json["custom"]["fetched-apps"]["shortlist"] = args.apps_shortlist

with open(args.targets_file, "w") as f:
json.dump(targets, f)

Expand Down

0 comments on commit 4de7e92

Please sign in to comment.