Merge pull request #15706 from Jason2866/work

https:// as file source for Littlefs partition build
This commit is contained in:
Jason2866 2022-05-27 21:01:06 +02:00 committed by GitHub
commit 57d6509126
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -54,6 +54,14 @@ def esp32_build_filesystem(fs_size):
for file in files:
if "no_files" in file:
continue
if "http" and "://" in file:
response = requests.get(file)
if response.ok:
target = join(filesystem_dir,file.split(os.path.sep)[-1])
open(target, "wb").write(response.content)
else:
print("Failed to download: ",file)
continue
shutil.copy(file, filesystem_dir)
if not os.listdir(filesystem_dir):
print("No files added -> will NOT create littlefs.bin and NOT overwrite fs partition!")

View File

@ -19,6 +19,7 @@ build_flags = ${env:tasmota32_base.build_flags} -D FIRMWARE_TASM
; example for custom file upload in Tasmota Filesystem
; custom_files_upload = ${env:tasmota32_base.custom_files_upload}
; tasmota/berry/modules/Partition_wizard.tapp
; https://github.com/tasmota/autoconf/raw/main/esp32s3/DevKitC-1.autoconf
; *** Debug version used for PlatformIO Home Project Inspection
[env:tasmota-debug]