scripts: sconsdist: added stub file artifact for older ufbt (#2568)

* scripts: sconsdist: added stub file artifact for older ufbt
* scripts: sconsdist: not creating dummy SDK archive
This commit is contained in:
hedger 2023-04-06 23:37:12 +04:00 committed by GitHub
parent 0d8518d31d
commit 89161a7a1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,21 +84,16 @@ class Main(App):
if exists(sdk_folder := join(obj_directory, foldertype)):
self.note_dist_component(foldertype, "dir", sdk_folder)
def package_zip(self, foldertype, sdk_folder):
# TODO: remove this after everyone migrates to new uFBT
self.create_zip_stub("lib")
def create_zip_stub(self, foldertype):
with zipfile.ZipFile(
self.get_dist_path(self.get_dist_file_name(foldertype, "zip")),
"w",
zipfile.ZIP_DEFLATED,
) as zf:
for root, _, files in walk(sdk_folder):
for file in files:
zf.write(
join(root, file),
relpath(
join(root, file),
sdk_folder,
),
)
) as _:
pass
def copy(self) -> int:
self._dist_components: dict[str, str] = dict()