mirror of
https://github.com/justLV/onju-v2
synced 2026-04-21 15:47:55 +00:00
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:
parent
7b734b96b8
commit
81452009d7
1 changed files with 1 additions and 1 deletions
2
flash.sh
2
flash.sh
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue