@@ -11,6 +11,13 @@ set -e
1111SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
1212cd " $SCRIPT_DIR "
1313
14+ # Load .env file if it exists (optional for local CRC setups)
15+ if [ -f " .env" ]; then
16+ set -a # automatically export all variables
17+ source .env
18+ set +a
19+ fi
20+
1421# Colors for output
1522RED=' \033[0;31m'
1623GREEN=' \033[0;32m'
@@ -180,20 +187,6 @@ if [ "${1:-}" = "secrets" ]; then
180187 exit 1
181188 fi
182189
183- # Load .env
184- echo -e " ${YELLOW} Loading environment configuration (.env)...${NC} "
185- ENV_FILE=" .env"
186- if [[ ! -f " $ENV_FILE " ]]; then
187- echo -e " ${RED} ❌ .env file not found${NC} "
188- echo -e " ${YELLOW} Please create .env file from env.example:${NC} "
189- echo " cp env.example .env"
190- echo " # Edit .env and add your actual API key and Git configuration"
191- exit 1
192- fi
193- set -a
194- source " $ENV_FILE "
195- set +a
196-
197190 # Generate secrets values like in full deploy
198191 OAUTH_ENV_FILE=" oauth-secret.env"
199192 CLIENT_SECRET_VALUE=" ${OCP_OAUTH_CLIENT_SECRET:- } "
263256echo -e " ${GREEN} ✅ Authenticated as: $( oc whoami) ${NC} "
264257echo " "
265258
266- # Load required environment file
267- echo -e " ${YELLOW} Loading environment configuration (.env)...${NC} "
268- ENV_FILE=" .env"
269- if [[ ! -f " $ENV_FILE " ]]; then
270- echo -e " ${RED} ❌ .env file not found${NC} "
271- echo -e " ${YELLOW} Please create .env file from env.example:${NC} "
272- echo " cp env.example .env"
273- echo " # Edit .env and add your actual API key and Git configuration"
274- exit 1
275- fi
276- set -a
277- source " $ENV_FILE "
278- set +a
279- echo " "
280-
281259# Prepare oauth secret env file for kustomize secretGenerator
282260echo -e " ${YELLOW} Preparing oauth secret env for kustomize...${NC} "
283261OAUTH_ENV_FILE=" oauth-secret.env"
0 commit comments