#!/usr/bin/env bash # Render the prod bot-host env.bot.sh from the workflow job environment. # # Sourced identically by prod-deploy (deploy-bot) and prod-rollback # (rollback-bot) so the two paths cannot drift (see deploy/write-prod-env.sh # for the same rationale on the main host). # # Usage: BOT_IMAGE= bash deploy/write-prod-bot-env.sh # # Every other value comes from the caller's environment (the job `env:` block). out="${1:?usage: write-prod-bot-env.sh }" # The bot's Mini App URL is the same public origin the SPA serves; derive it # rather than storing a second copy. base="${PUBLIC_BASE_URL%/}" TELEGRAM_MINIAPP_URL="$base/telegram/" cat > "$out" <