mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-07 11:22:31 +00:00
The wizard bypass left ERPNext without a Company, so no app could create quotes, orders or invoices. The deploy now creates the Company from the service provider's name and country, with the currency from ERPNext's country data and an abbreviation that defaults to the name's initials, plus a fiscal year, five tax accounts, a cash account and the default company. It never rewrites an existing Company and fails loudly on a country ERPNext does not know. The README generator marks roles that read the service provider country, and the CI replay fills the placeholder. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
22 lines
1021 B
Bash
Executable File
22 lines
1021 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Extract the role README's "### Production" bash block and replay it against
|
|
# the running compose server, exactly as the guide instructs a human to.
|
|
# Env: GUIDE_ROLE; INFINITO_CONTAINER comes from scripts/meta/env/load.sh.
|
|
set -euo pipefail
|
|
|
|
: "${GUIDE_ROLE:?}"
|
|
|
|
awk '/^### Production$/{p=1} p && /^```bash$/{c=1; next} c && /^```$/{exit} c' \
|
|
"roles/${GUIDE_ROLE}/README.md" >/tmp/deploy.sh
|
|
sed -n '1,/docker run/p' /tmp/deploy.sh | grep -E '^[A-Z_]+=' |
|
|
sed 's#^HOST=.*#HOST=localhost#' >/tmp/run.sh
|
|
perl -0777 -ne "print \$1 if /bash -c '(.*)'/s" /tmp/deploy.sh >>/tmp/run.sh
|
|
test -s /tmp/run.sh
|
|
# shellcheck source=/dev/null
|
|
source scripts/meta/env/load.sh
|
|
sed -i "s#<your-ssh-public-key>#ssh-ed25519 AAAA_TEST_DUMMY_KEY github-ci-dummy@infinito#" /tmp/run.sh
|
|
sed -i "s#<your-domain>#${INFINITO_DOMAIN}#" /tmp/run.sh
|
|
sed -i "s#<your-clearnet-resolver>#${INFINITO_DNS_IP}#" /tmp/run.sh
|
|
sed -i "s#<your-country>#Germany#" /tmp/run.sh
|
|
docker exec -i "${INFINITO_CONTAINER}" bash -s </tmp/run.sh
|