Some checks failed
ci/woodpecker/push/billing_fees Pipeline was successful
ci/woodpecker/push/bff Pipeline was successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/chain_gateway Pipeline was successful
ci/woodpecker/push/fx_ingestor Pipeline was successful
ci/woodpecker/push/frontend Pipeline was successful
ci/woodpecker/push/fx_oracle Pipeline was successful
ci/woodpecker/push/nats Pipeline was successful
ci/woodpecker/push/ledger Pipeline was successful
ci/woodpecker/push/notification Pipeline was successful
ci/woodpecker/push/payments_orchestrator Pipeline was successful
ci/woodpecker/push/bump_version Pipeline failed
56 lines
1.2 KiB
Bash
Executable File
56 lines
1.2 KiB
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
if ! set -o pipefail 2>/dev/null; then
|
|
:
|
|
fi
|
|
|
|
REPO_ROOT="$(cd "$(dirname "$0")/../../.." && pwd)"
|
|
cd "${REPO_ROOT}"
|
|
|
|
sh ci/scripts/common/ensure_env_version.sh
|
|
|
|
normalize_env_file() {
|
|
file="$1"
|
|
tmp="${file}.tmp.$$"
|
|
tr -d '\r' <"$file" >"$tmp"
|
|
mv "$tmp" "$file"
|
|
}
|
|
|
|
load_env_file() {
|
|
file="$1"
|
|
while IFS= read -r line || [ -n "$line" ]; do
|
|
case "$line" in
|
|
''|\#*) continue ;;
|
|
esac
|
|
key="${line%%=*}"
|
|
value="${line#*=}"
|
|
key="$(printf '%s' "$key" | tr -d '[:space:]')"
|
|
value="${value#"${value%%[![:space:]]*}"}"
|
|
value="${value%"${value##*[![:space:]]}"}"
|
|
export "$key=$value"
|
|
done <"$file"
|
|
}
|
|
|
|
FRONTEND_ENV_NAME="${FRONTEND_ENV:-prod}"
|
|
RUNTIME_ENV_FILE="./ci/${FRONTEND_ENV_NAME}/.env.runtime"
|
|
|
|
if [ ! -f "${RUNTIME_ENV_FILE}" ]; then
|
|
echo "[frontend-deploy] runtime env file not found: ${RUNTIME_ENV_FILE}" >&2
|
|
exit 1
|
|
fi
|
|
|
|
normalize_env_file "${RUNTIME_ENV_FILE}"
|
|
normalize_env_file ./.env.version
|
|
|
|
load_env_file "${RUNTIME_ENV_FILE}"
|
|
load_env_file ./.env.version
|
|
|
|
if [ ! -s .env.version ]; then
|
|
echo ".env.version is missing; run version step first" >&2
|
|
exit 66
|
|
fi
|
|
|
|
bash ci/prod/scripts/bootstrap/network.sh
|
|
bash ci/prod/scripts/deploy/frontend.sh
|