Files
computer-playbook/scripts/install/all.sh
T
kevinveenbirkenbachandClaude Opus 5 3ea989a713 style: delete the comments the policy rejects across the tree
121 lines of restated code, step narration, section banners and rationale
prose, in workflow YAML, compose overrides, group_vars, lookup and action
plugins, role tasks, shell scripts and tests.

Three lines go the other way: where a reason has to survive it is now a
registered nocheck directive carrying it, not free prose. Two of them point at
an invariant further down the same file, the third records why an end-of-life
object store keeps no Playwright surface.

Scope was decided per line rather than per file. Classifying by "no additions"
would have swept roles/web-app-erpnext/tasks along with it, where the removed
lines are delegate_to, environment and cmd — a behaviour change that has no
business in a comment commit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-03 01:23:08 +02:00

67 lines
2.0 KiB
Bash
Executable File

#!/usr/bin/env bash
# Install all runtime dependencies, incremental via a stamp file.
#
# Re-runs the install chain (dev-python bootstrap -> venv -> python -> ansible)
# only when a recipe input is newer than the stamp at build/install.stamp.
# Pass --force (or run `make install-force`) to drop the stamp first.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"
cd "${REPO_ROOT}"
# shellcheck source=scripts/meta/env/python.sh
source "${REPO_ROOT}/scripts/meta/env/python.sh"
# shellcheck source=/dev/null
source <(grep -E '^INFINITO_PYTHON_INSTALL_SCRIPT=' "${REPO_ROOT}/default.env")
: "${INFINITO_PYTHON_INSTALL_SCRIPT:?}"
STAMP="build/install.stamp"
DEPS=(
pyproject.toml
requirements/requirements.galaxy.yml
requirements/requirements.git.yml
scripts/install/python.sh
scripts/install/ansible.sh
scripts/install/venv.sh
"${INFINITO_PYTHON_INSTALL_SCRIPT}"
)
if [[ "${1:-}" == "--force" ]]; then
rm -f "${STAMP}"
fi
needs_install=0
if [[ ! -f "${STAMP}" ]]; then
needs_install=1
elif [[ ! -x "${VENV}/bin/python" ]]; then
echo "[install] stamp present but venv missing at ${VENV}; reinstalling" >&2
needs_install=1
else
for dep in "${DEPS[@]}"; do
if [[ ! -f "${dep}" ]]; then
echo "[install] missing dependency: ${dep}" >&2
exit 1
fi
if [[ "${dep}" -nt "${STAMP}" ]]; then
needs_install=1
break
fi
done
fi
if [[ "${needs_install}" -eq 0 ]]; then
exit 0
fi
bash "${INFINITO_PYTHON_INSTALL_SCRIPT}" ensure
bash scripts/install/venv.sh
bash scripts/install/python.sh deploy
ANSIBLE_COLLECTIONS_DIR="${HOME}/.ansible/collections" bash scripts/install/ansible.sh
stamp_dir="$(dirname "${STAMP}")"
mkdir -p "${stamp_dir}"
chmod 0777 "${stamp_dir}" 2>/dev/null || true # nocheck: shell-or-true -- grandfathered: worked in practice; TODO: sharpen to catch only the exact tolerated error
touch "${STAMP}"
chmod 0777 "${STAMP}" 2>/dev/null || true # nocheck: shell-or-true -- grandfathered: worked in practice; TODO: sharpen to catch only the exact tolerated error