fix(ops): don't flag a dirty-tree skip that's already been committed
The deploy timer can record a dirty-tree skip mid-edit; once the tree is clean that reason is stale. Verify git status before flagging it (and parse the timer NEXT row only when it is a real timestamp).
This commit is contained in:
parent
5fff51c814
commit
09b51a764a
1 changed files with 7 additions and 3 deletions
|
|
@ -140,8 +140,12 @@ else
|
|||
throttled)
|
||||
p " ${DIM}→ batching to save Netlify credits; it deploys automatically when the window elapses.${N}" ;;
|
||||
dirty-tree)
|
||||
p " ${R}→ tracked files are modified — COMMIT them or the deploy stays skipped.${N}"
|
||||
problems+=("deploy blocked: working tree is dirty"); signature+="dirty;" ;;
|
||||
if [ -n "$(git status --porcelain --untracked-files=no)" ]; then
|
||||
p " ${R}→ tracked files are modified — COMMIT them or the deploy stays skipped.${N}"
|
||||
problems+=("deploy blocked: working tree is dirty"); signature+="dirty;"
|
||||
else
|
||||
p " ${DIM}→ the tree was dirty earlier and is clean now — the next tick will deploy.${N}"
|
||||
fi ;;
|
||||
smoke-failed)
|
||||
p " ${R}→ the built bundle failed the smoke test (real breakage — check the journal).${N}"
|
||||
problems+=("smoke test failed during deploy"); signature+="smoke;" ;;
|
||||
|
|
@ -182,7 +186,7 @@ p ""
|
|||
p "${B}▸ Timer${N}"
|
||||
timer_state="$(systemctl --user is-active skatespots-deploy.timer 2>/dev/null || echo unknown)"
|
||||
if [ "$timer_state" = "active" ]; then
|
||||
next_at="$(systemctl --user list-timers skatespots-deploy.timer --no-legend --no-pager 2>/dev/null | awk '{print $1" "$2" "$3}')"
|
||||
next_at="$(systemctl --user list-timers skatespots-deploy.timer --no-legend --no-pager 2>/dev/null | awk '$1 != "-" {print $1" "$2" "$3}')"
|
||||
p " ${G}✓${N} skatespots-deploy.timer active${next_at:+ ${DIM}next $next_at${N}}"
|
||||
else
|
||||
p " ${R}✗${N} skatespots-deploy.timer: ${timer_state}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue