- Introduced Aggregator.sol for Chainlink-compatible oracle functionality, including round-based updates and access control. - Added OracleWithCCIP.sol to extend Aggregator with CCIP cross-chain messaging capabilities. - Created .gitmodules to include OpenZeppelin contracts as a submodule. - Developed a comprehensive deployment guide in NEXT_STEPS_COMPLETE_GUIDE.md for Phase 2 and smart contract deployment. - Implemented Vite configuration for the orchestration portal, supporting both Vue and React frameworks. - Added server-side logic for the Multi-Cloud Orchestration Portal, including API endpoints for environment management and monitoring. - Created scripts for resource import and usage validation across non-US regions. - Added tests for CCIP error handling and integration to ensure robust functionality. - Included various new files and directories for the orchestration portal and deployment scripts.
46 lines
900 B
Bash
Executable File
46 lines
900 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Environment loader and profile support
|
|
# Provides: load_env [--profile <name>] [--file <path>] and helpers
|
|
|
|
set -euo pipefail
|
|
|
|
DEFAULT_ENV_FILE="${DEFAULT_ENV_FILE:-.env}"
|
|
|
|
load_env() {
|
|
local profile=""; local file="$DEFAULT_ENV_FILE"; local opt
|
|
while [[ $# -gt 0 ]]; do
|
|
opt="$1"
|
|
case "$opt" in
|
|
--profile)
|
|
profile="$2"; shift 2;;
|
|
--file)
|
|
file="$2"; shift 2;;
|
|
*)
|
|
break;;
|
|
esac
|
|
done
|
|
if [ -f "$file" ]; then
|
|
# shellcheck disable=SC2046
|
|
set -a; . "$file"; set +a
|
|
fi
|
|
if [ -n "$profile" ]; then
|
|
local pf="${file}.${profile}"
|
|
if [ -f "$pf" ]; then
|
|
# shellcheck disable=SC2046
|
|
set -a; . "$pf"; set +a
|
|
fi
|
|
fi
|
|
}
|
|
|
|
require_env() {
|
|
local name="$1"
|
|
if [ -z "${!name:-}" ]; then
|
|
echo "Missing required env: $name" >&2
|
|
return 1
|
|
fi
|
|
}
|
|
|
|
current_profile() {
|
|
echo "${ENV_PROFILE:-}"
|
|
}
|