ci: streamline release workflows by removing unnecessary binary uploads and adding SPIFFS formatting
This commit is contained in:
parent
b5330af351
commit
ebb08a7a66
@ -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 \
|
||||
|
@ -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
|
||||
.pio/build/esp32dev_ota/filaman_full.bin
|
@ -4,4 +4,18 @@ Import("env")
|
||||
exec(open("./scripts/pre_build.py").read())
|
||||
|
||||
# Bind to SPIFFS build
|
||||
env.AddPreAction("buildfs", replace_version)
|
||||
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.")
|
Loading…
x
Reference in New Issue
Block a user