mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-12 21:56:21 +00:00
make design-palette renders a deployed app with another base color, runs its design assertions and renders the base of the inventory again through an EXIT trap, also when a render or an assertion fails. sync=design re-renders the static design files, sync=role re-runs the app role for values it bakes at deploy time. make design-gallery takes pw= to replace the default pattern. Such a run adds its screenshots to the existing ones, so a single view is recaptured without a full run. The role pass now runs the gate once after its last edit, checks the palette with blue only, repeats the full deploy at its end only when it changed provisioning and has a wall-clock budget per class. The verification decision of the requirement records the same rule. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
46 lines
1.4 KiB
Bash
Executable File
46 lines
1.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Run the design assertions of one deployed app with another base color and
|
|
# put the base of the inventory back afterwards, also when a step fails.
|
|
#
|
|
# Param app: deployed application id (required).
|
|
# Param base: hex base color for the check, e.g. '#001f3f' (required).
|
|
# Param sync: `design` re-renders the static design files, `role` re-runs the app role for values it bakes at deploy time (required).
|
|
# Param variant: matrix round index the app was deployed with (optional).
|
|
set -euo pipefail
|
|
|
|
: "${app:?app=<application_id> required}"
|
|
: "${base:?base=<hex> required}"
|
|
: "${sync:?sync=<design|role> required}"
|
|
|
|
case "${sync}" in
|
|
design | role) ;;
|
|
*)
|
|
echo "sync must be 'design' or 'role', got '${sync}'" >&2
|
|
exit 2
|
|
;;
|
|
esac
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
REPO_ROOT="$(cd "${SCRIPT_DIR}/../../.." && pwd)"
|
|
cd "${REPO_ROOT}"
|
|
|
|
render() {
|
|
if [[ "${sync}" == design ]]; then
|
|
app="${app}" variant="${variant:-}" base="${1}" bash scripts/tests/design/sync.sh
|
|
else
|
|
role="${app}" variant="${variant:-}" base="${1}" bash scripts/tests/deploy/local/sync/role.sh
|
|
fi
|
|
}
|
|
|
|
restore() {
|
|
render "" || {
|
|
echo "restore failed: the stack still renders base ${base}" >&2
|
|
exit 1
|
|
}
|
|
}
|
|
|
|
trap restore EXIT
|
|
render "${base}"
|
|
cmd="bash scripts/tests/e2e/rerun-spec.sh '${app}' --grep design: --grep-invert gallery --retries=0" \
|
|
bash scripts/tests/deploy/local/exec/container.sh
|