Skip to content

Commit

Permalink
change order in json file and zip
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason2866 authored Dec 21, 2023
1 parent 0463dcd commit 9ef6697
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions build-zip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,33 +62,33 @@ JSON_STRING=$( jq -n \
--arg version "$tasmota_version" \
--arg build_id "$build_id/tasmota-$tasmota_version" \
--arg build_timestamp "$build_date" \
--arg app_file "$app_file" \
--argjson app_file_size $app_file_size \
--arg app_cs_sha1 "$app_file_cs1" \
--arg app_cs_sha256 "$app_file_cs256" \
--arg boot_file "$boot_file" \
--argjson boot_file_addr "$boot_file_addr" \
--argjson boot_file_size $boot_file_size \
--arg boot_cs_sha1 "$boot_file_cs1" \
--arg boot_cs_sha256 "$boot_file_cs256" \
--arg fs_file "$fs_file" \
--argjson fs_file_size $fs_file_size \
--arg fs_cs_sha1 "$fs_file_cs1" \
--arg fs_cs_sha256 "$fs_file_cs256" \
--arg otadata_file "$otadata_file" \
--argjson otadata_file_size $otadata_file_size \
--arg otadata_cs_sha1 "$otadata_file_cs1" \
--arg otadata_cs_sha256 "$otadata_file_cs256" \
--arg partition_file "$partition_file" \
--argjson partition_file_size $partition_file_size \
--arg partition_cs_sha1 "$partition_file_cs1" \
--arg partition_cs_sha256 "$partition_file_cs256" \
--arg otadata_file "$otadata_file" \
--argjson otadata_file_size $otadata_file_size \
--arg otadata_cs_sha1 "$otadata_file_cs1" \
--arg otadata_cs_sha256 "$otadata_file_cs256" \
--arg app_file "$app_file" \
--argjson app_file_size $app_file_size \
--arg app_cs_sha1 "$app_file_cs1" \
--arg app_cs_sha256 "$app_file_cs256" \
--arg fs_file "$fs_file" \
--argjson fs_file_size $fs_file_size \
--arg fs_cs_sha1 "$fs_file_cs1" \
--arg fs_cs_sha256 "$fs_file_cs256" \
'{ "name" : $name, "platform" : $platform, "version" : $version, "build_id" : $build_id, "build_timestamp" : $build_timestamp, "parts": { "app": { "type": "app", "src": $app_file, "size": $app_file_size, "cs_sha1" : $app_cs_sha1, "cs_sha256" : $app_cs_sha256, "encrypt": true, "ptn": "app_0"}, "boot": { "type": "boot", "src": $boot_file, "addr": $boot_file_addr, "size": $boot_file_size, "cs_sha1" : $boot_cs_sha1, "cs_sha256": $boot_cs_sha256, "encrypt": true, "update": true }, "fs": { "type": "fs", "src": $fs_file, "size": $fs_file_size, "cs_sha1": $fs_cs_sha1, "cs_sha256": $fs_cs_sha256, "fs_size": $fs_file_size, "encrypt": true, "ptn": "fs_1" }, "nvs": { "type": "nvs", "size": 16384, "fill": 255, "ptn": "nvs" }, "otadata": { "type": "otadata", "src": $otadata_file, "size": $otadata_file_size, "cs_sha1": $otadata_cs_sha1, "cs_sha256": $otadata_cs_sha256, "encrypt": true, "ptn": "otadata"}, "pt": { "type": "pt", "src": $partition_file, "addr": 32768, "size": $partition_file_size, "cs_sha1": $partition_cs_sha1, "cs_sha256": $partition_cs_sha256, "encrypt": true }}}')
printf "$JSON_STRING" > build-files/manifest.json
cd build-files
zip -0 mgos32-to-tasmota32-$shelly_device.zip manifest.json $app_file $boot_file $fs_file $otadata_file $partition_file
zip -0 mgos32-to-tasmota32-$shelly_device.zip manifest.json $boot_file $partition_file $otadata_file $app_file $fs_file
mv mgos32-to-tasmota32-$shelly_device.zip ../output/
cd ..
Expand Down

0 comments on commit 9ef6697

Please sign in to comment.