Standardize deployment env and deployer handling

This commit is contained in:
defiQUG
2026-04-22 14:47:28 -07:00
parent 768168de5e
commit c3d4c786fa
51 changed files with 424 additions and 621 deletions

View File

@@ -5,19 +5,17 @@
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
if [[ -f "$SCRIPT_DIR/../lib/deployment/dotenv.sh" ]]; then
# shellcheck disable=SC1090
source "$SCRIPT_DIR/../lib/deployment/dotenv.sh"
load_deployment_env --repo-root "$PROJECT_ROOT"
fi
echo "=== Environment Variables Requirements Check ==="
echo ""
# Check if .env exists
if [ -f .env ]; then
echo "✓ .env file exists"
source .env
else
echo "✗ .env file not found"
echo " Create it from .env.template or manually"
echo ""
fi
echo ""
echo "=== Required Variables (Must Be Set) ==="
echo ""
@@ -32,7 +30,7 @@ REQUIRED_ALL=(
MISSING_REQUIRED=()
for var in "${REQUIRED_ALL[@]}"; do
if [ -z "${!var}" ] || [ "${!var}" == "0x..." ] || [ "${!var}" == "your_etherscan_api_key" ] || [ "${!var}" == "http://chain138.example.com:8545" ]; then
if [ -z "${!var:-}" ] || [ "${!var:-}" == "0x..." ] || [ "${!var:-}" == "your_etherscan_api_key" ] || [ "${!var:-}" == "http://chain138.example.com:8545" ]; then
echo "$var: NOT SET or using placeholder"
MISSING_REQUIRED+=("$var")
else
@@ -180,6 +178,13 @@ else
echo "Please set these variables in .env file before deployment"
fi
echo ""
echo "=== External Dependency Blockers ==="
echo ""
if ! bash "$PROJECT_ROOT/scripts/verify/check-external-dependencies.sh" --advisory; then
true
fi
echo ""
echo "=== Next Steps ==="
echo ""
@@ -194,4 +199,3 @@ else
fi
echo ""