Check for .ino.bin artifact to detect stale/missing builds

Look for the actual firmware binary (*.ino.bin) instead of any *.bin
when deciding whether to skip compilation. If the build dir exists but
the artifact is missing, force a recompile automatically.
This commit is contained in:
justLV 2026-04-08 10:53:58 -07:00
parent 7b734b96b8
commit 81452009d7

View file

@ -145,7 +145,7 @@ echo ""
# -------------------------------------------------------
NEEDS_COMPILE=true
if [ "$FORCE_COMPILE" = false ] && [ -d "$BUILD_DIR" ]; then
BIN=$(find "$BUILD_DIR" -name "*.bin" -maxdepth 1 2>/dev/null | head -1)
BIN=$(find "$BUILD_DIR" -name "*.ino.bin" -maxdepth 1 2>/dev/null | head -1)
if [ -n "$BIN" ]; then
NEWER=$(find "$PROJECT_DIR" -maxdepth 1 \( -name "*.ino" -o -name "*.h" \) -newer "$BIN" 2>/dev/null | head -1)
[ -z "$NEWER" ] && NEEDS_COMPILE=false