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 MX
parent 011c0b1914
commit a5a95847ea
No known key found for this signature in database
GPG key ID: 7CCC66B7DBDD1C83

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()