-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvalidate-active-stack.sh
More file actions
executable file
·40 lines (31 loc) · 997 Bytes
/
Copy pathvalidate-active-stack.sh
File metadata and controls
executable file
·40 lines (31 loc) · 997 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
section() {
printf "\n== %s ==\n" "$1"
}
check_clean_tree() {
local phase="$1"
if ! git -C "$ROOT_DIR" diff --quiet || ! git -C "$ROOT_DIR" diff --cached --quiet; then
echo "Working tree is dirty ${phase}:"
git -C "$ROOT_DIR" status --short
echo
echo "Clean deliberately before validating:"
echo " git restore <path>"
echo
echo "If this is lockfile drift, inspect before restoring."
exit 1
fi
}
section "preflight working tree check"
check_clean_tree "before validation"
section "email-pipeline"
(cd "$ROOT_DIR/apps/email-pipeline" && ./scripts/validate.sh)
section "api"
(cd "$ROOT_DIR/apps/api" && ./scripts/validate.sh)
section "dashboard"
(cd "$ROOT_DIR/apps/dashboard" && npm run validate)
section "working tree check"
check_clean_tree "after validation"
section "done"
echo "Active operator stack validation passed and working tree is clean."