File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ # ddev-generated
3+
4+ # ── Sanity check ─────────────────────────────────────────────────────────────
5+ ddev sanity-check
6+ if [[ $? -ne 0 ]]; then
7+ echo " "
8+ echo " 🚫 Push aborted: sanity-check failed. Fix the issues above or use --no-verify to push anyway."
9+ exit 1
10+ fi
11+
12+ # ── Backstop tests check ────────────────────────────────────────────────────
13+ if [ -f " tests/backstop/backstop.json" ]; then
14+ BASE_DIR=" tests/backstop/backstop_data/bitmaps_test"
15+ TODAY=$( date +%Y%m%d)
16+ MATCH=$( find " $BASE_DIR " -maxdepth 1 -type d -name " ${TODAY} -*" 2> /dev/null)
17+
18+ if [ -z " $MATCH " ]; then
19+ echo " "
20+ echo " =================================================================================================="
21+ echo " ⚠️ No Backstop test folder found for today ($TODAY ) in $BASE_DIR "
22+ echo " Did you run Backstop and other tests?"
23+ echo " =================================================================================================="
24+ echo " "
25+ read -p " Continue pushing without Backstop tests? (y/N): " backstop_confirm < /dev/tty
26+ backstop_confirm=${backstop_confirm:- N}
27+ if [[ ! " $backstop_confirm " =~ ^[Yy] ]]; then
28+ echo " 🚫 Push aborted. Run Backstop and other tests or use --no-verify to skip this check."
29+ exit 1
30+ fi
31+ fi
32+ fi
33+
34+ exit 0
You can’t perform that action at this time.
0 commit comments