ops: taler-landing scripts add laptop --ssh deploy path and --deploy chain

This commit is contained in:
Hernâni Marques 2026-09-17 18:47:38 +02:00
parent 83b1616ed6
commit 60f917fc31
No known key found for this signature in database
3 changed files with 122 additions and 9 deletions

View file

@ -21,11 +21,17 @@
# 3) git add configs/ && git commit -m "landing(bank): …"
# 4) ./scripts/taler-landing/stamp-landing-version.sh bank
# git add configs/ && git commit --amend --no-edit # optional pin
# 5) ./scripts/taler-landing/deploy-landings.sh --ssh
# or combine: stamp-landing-version.sh --bump bank --deploy
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
VER_FILE="$ROOT/configs/shared/landing-version.json"
REPO_WEB="${LANDING_REPO_WEB:-https://git.hacktivism.ch/hernani/koopa-admin-log}"
SSH_HOST="${LANDING_SSH:-hernani@192.168.100.95}"
CTR="${LANDING_CTR:-goa-regio-ng}"
DO_DEPLOY=0
USE_SSH=1
declare -A SITE_HTML=(
[bank]="$ROOT/configs/bank-landing/index.html"
@ -55,9 +61,13 @@ while [ $# -gt 0 ]; do
--bump) bump=1; shift ;;
--set) set_ver="${2:-}"; shift 2 ;;
--all) do_all=1; shift ;;
--deploy) DO_DEPLOY=1; shift ;;
--ssh) SSH_HOST="${2:-}"; USE_SSH=1; shift 2 ;;
--local) USE_SSH=0; shift ;;
--ctr) CTR="${2:-}"; shift 2 ;;
bank|exchange|merchant) sites+=("$1"); shift ;;
-h|--help)
sed -n '2,28p' "$0"
sed -n '2,32p' "$0"
exit 0
;;
*) echo "unknown arg: $1 (sites: bank exchange merchant)" >&2; exit 2 ;;
@ -191,3 +201,15 @@ PY
done
echo "OK stamped: ${sites[*]}"
if [ "$DO_DEPLOY" = 1 ]; then
deploy="$ROOT/scripts/taler-landing/deploy-landings.sh"
[ -x "$deploy" ] || { echo "missing $deploy" >&2; exit 1; }
if [ "$USE_SSH" = 1 ]; then
echo "=== --deploy → deploy-landings.sh --ssh ${SSH_HOST} --ctr ${CTR} ==="
LANDING_CTR="$CTR" "$deploy" --ssh "$SSH_HOST" --ctr "$CTR"
else
echo "=== --deploy → deploy-landings.sh --local --ctr ${CTR} ==="
LANDING_CTR="$CTR" "$deploy" --local --ctr "$CTR"
fi
fi