Skip to content

Commit 4e5a68e

Browse files
johanstokking0xc0170
authored andcommitted
ZIP export static files
Signed-off-by: Johan Stokking <[email protected]>
1 parent f16c4d0 commit 4e5a68e

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
@@ -344,13 +344,14 @@ def export_project(src_paths, export_path, target, ide, libraries_paths=None,
344344
if label not in toolchain.target.features:
345345
resource.add(res)
346346
if isinstance(zip_proj, basestring):
347-
zip_export(join(export_path, zip_proj), name, resource_dict, files,
348-
inc_repos)
347+
zip_export(join(export_path, zip_proj), name, resource_dict,
348+
files + exporter.static_files, inc_repos)
349349
else:
350-
zip_export(zip_proj, name, resource_dict, files, inc_repos)
351-
352-
for static_file in exporter.static_files:
353-
if not exists(join(export_path, basename(static_file))):
354-
copyfile(static_file, join(export_path, basename(static_file)))
350+
zip_export(zip_proj, name, resource_dict,
351+
files + exporter.static_files, inc_repos)
352+
else:
353+
for static_file in exporter.static_files:
354+
if not exists(join(export_path, basename(static_file))):
355+
copyfile(static_file, join(export_path, basename(static_file)))
355356

356357
return exporter

0 commit comments

Comments
 (0)