diff --git a/.github/workflows/providers/gitea-release.yml b/.github/workflows/providers/gitea-release.yml index 144e5fb..31ce022 100644 --- a/.github/workflows/providers/gitea-release.yml +++ b/.github/workflows/providers/gitea-release.yml @@ -69,8 +69,6 @@ jobs: # Verify magic bytes echo "Checking magic bytes:" - echo "OTA binary first bytes:" - xxd -l 16 filaman_ota.bin echo "Full binary first bytes:" xxd -l 16 filaman_full.bin @@ -105,7 +103,7 @@ jobs: # Upload binaries cd .pio/build/esp32dev_ota - for file in filaman_full.bin filaman_ota.bin filaman.bin filaman_spiffs.bin; do + for file in filaman_full.bin; do echo "Uploading $file..." curl -k -s \ -X POST \ diff --git a/.github/workflows/providers/github-release.yml b/.github/workflows/providers/github-release.yml index d12f3b7..89cb3e6 100644 --- a/.github/workflows/providers/github-release.yml +++ b/.github/workflows/providers/github-release.yml @@ -58,8 +58,6 @@ jobs: # Verify magic bytes echo "Checking magic bytes:" - echo "OTA binary first bytes:" - xxd -l 16 filaman_ota.bin echo "Full binary first bytes:" xxd -l 16 filaman_full.bin @@ -88,7 +86,4 @@ jobs: gh release create "${{ github.ref_name }}" \ --title "Release ${{ steps.get_version.outputs.VERSION }}" \ --notes "${{ steps.changelog.outputs.CHANGES }}" \ - .pio/build/esp32dev_ota/filaman_full.bin \ - .pio/build/esp32dev_ota/filaman_ota.bin \ - .pio/build/esp32dev_ota/filaman.bin \ - .pio/build/esp32dev_ota/filaman_spiffs.bin \ No newline at end of file + .pio/build/esp32dev_ota/filaman_full.bin \ No newline at end of file diff --git a/scripts/pre_spiffs.py b/scripts/pre_spiffs.py index 2901895..5c6da82 100644 --- a/scripts/pre_spiffs.py +++ b/scripts/pre_spiffs.py @@ -4,4 +4,18 @@ Import("env") exec(open("./scripts/pre_build.py").read()) # Bind to SPIFFS build -env.AddPreAction("buildfs", replace_version) \ No newline at end of file +env.AddPreAction("buildfs", replace_version) + +import os +import shutil +from SCons.Script import DefaultEnvironment + +env = DefaultEnvironment() + +# Format SPIFFS partition before uploading new files +spiffs_dir = os.path.join(env.subst("$BUILD_DIR"), "spiffs") +if os.path.exists(spiffs_dir): + shutil.rmtree(spiffs_dir) +os.makedirs(spiffs_dir) + +print("SPIFFS partition formatted.") \ No newline at end of file