mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-08 03:38:23 +00:00
Follow-up to the swarm CID/redis fix that make quality flagged: - Extract the site-bootstrap sequence into 02b_create_site.yml (renamed from 02b_restart_frappe.yml; now new-site + restart + re-resolve + wait) and include it with when: rc \!= 0, so the oversized when-block disappears and the sub-file is not parsed at all when the site already exists. - The backend entrypoint now execs the image's real /usr/local/bin/entrypoint.sh after the config-ready gate, so the sites/assets symlink that entrypoint creates is preserved instead of relying on a sibling replica to recreate it. - Drop the now-dead ERPNEXT_BACKEND_CONTAINER_ADDRESS var, shorten two over-long OIDC restart task names, and remove stale narration comments. Also suppress the INFINITO_MAIN_REMOTE/BRANCH env lints in the git pre-push helper: they are maintainer tooling knobs, not deployment keys. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
27 lines
1.1 KiB
Bash
Executable File
27 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Pre-push gate: fail unless the upstream main branch is fully merged into HEAD.
|
|
# Fetches the remote main tip and requires every commit on it to be reachable
|
|
# from the current tip, so a branch can never be pushed while it lags main.
|
|
#
|
|
# Env overrides: INFINITO_MAIN_REMOTE (default origin), INFINITO_MAIN_BRANCH
|
|
# (default main).
|
|
set -euo pipefail
|
|
|
|
remote="${INFINITO_MAIN_REMOTE:-origin}" # nocheck: git maintainer tooling knob, not a deployment env key
|
|
branch="${INFINITO_MAIN_BRANCH:-main}" # nocheck: git maintainer tooling knob, not a deployment env key
|
|
|
|
cd "$(git rev-parse --show-toplevel)"
|
|
|
|
echo "assert-main-merged: fetching ${remote}/${branch} ..." >&2
|
|
git fetch --quiet "$remote" "$branch"
|
|
|
|
if git merge-base --is-ancestor FETCH_HEAD HEAD; then
|
|
echo "✅ assert-main-merged: ${remote}/${branch} is fully merged into HEAD." >&2
|
|
exit 0
|
|
fi
|
|
|
|
behind="$(git rev-list --count HEAD..FETCH_HEAD)"
|
|
echo "❌ assert-main-merged: ${remote}/${branch} has ${behind} commit(s) not merged into HEAD." >&2
|
|
echo " Merge upstream main first, e.g.: git pull ${remote} ${branch}" >&2
|
|
exit 1
|