Skip to content

Commit 9bcd1da

Browse files
committed
ZIP export static files
Signed-off-by: Johan Stokking <[email protected]>
1 parent f8abcf4 commit 9bcd1da

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

tools/export/__init__.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -346,13 +346,14 @@ def export_project(src_paths, export_path, target, ide, libraries_paths=None,
346346
if label not in toolchain.target.features:
347347
resource.add(res)
348348
if isinstance(zip_proj, basestring):
349-
zip_export(join(export_path, zip_proj), name, resource_dict, files,
350-
inc_repos)
349+
zip_export(join(export_path, zip_proj), name, resource_dict,
350+
files + exporter.static_files, inc_repos)
351351
else:
352-
zip_export(zip_proj, name, resource_dict, files, inc_repos)
353-
354-
for static_file in exporter.static_files:
355-
if not exists(join(export_path, basename(static_file))):
356-
copyfile(static_file, join(export_path, basename(static_file)))
352+
zip_export(zip_proj, name, resource_dict,
353+
files + exporter.static_files, inc_repos)
354+
else:
355+
for static_file in exporter.static_files:
356+
if not exists(join(export_path, basename(static_file))):
357+
copyfile(static_file, join(export_path, basename(static_file)))
357358

358359
return exporter

0 commit comments

Comments
 (0)