This commit is contained in:
suchmememanyskill
2023-11-13 16:20:42 +01:00
parent 7959fd8ebd
commit 91db5036c0
3 changed files with 90 additions and 4 deletions

50
generate_manifest.py Normal file
View File

@@ -0,0 +1,50 @@
import subprocess, json
latest_tag = subprocess.check_output(["git", "describe", "--tags", "--abbrev=0"])
data_without_wipe = {
"name": "CYD-Klipper-Display",
"new_install_prompt_erase": False,
"version": latest_tag.decode("utf-8").strip(),
"builds": [
{
"chipFamily": "ESP32",
"parts": [
{
"path": "output/bootloader.bin",
"offset": 4096
},
{
"path": "output/partitions.bin",
"offset": 32768
},
{
"path": "output/boot_app0.bin",
"offset": 57344
},
{
"path": "output/firmware.bin",
"offset": 65536
}
]
}
]
}
data_with_wipe = {
"name": "CYD-Klipper-Display",
"new_install_prompt_erase": False,
"version": latest_tag.decode("utf-8").strip(),
"builds": [
{
"path": "output/merged-firmware.bin",
"offset": 0
}
]
}
with open("manifest.json", "w") as f:
json.dump(data_without_wipe, f, indent=4)
with open("manifest_wipe.json", "w") as f:
json.dump(data_with_wipe, f, indent=4)