|
|
@ -17,34 +17,40 @@ parse_args "$@" |
|
|
|
print_header "Environment Variable Test" |
|
|
|
log_info "Testing environment variable handling at $(date)" |
|
|
|
|
|
|
|
# Test 1: Capacitor environment |
|
|
|
log_info "Test 1: Setting up Capacitor environment..." |
|
|
|
setup_build_env "capacitor" |
|
|
|
# Test 1: Capacitor environment (development) |
|
|
|
log_info "Test 1: Setting up Capacitor environment (development mode)..." |
|
|
|
setup_build_env "capacitor" "development" |
|
|
|
print_env_vars "VITE_" |
|
|
|
echo "" |
|
|
|
|
|
|
|
# Test 2: Web environment |
|
|
|
log_info "Test 2: Setting up Web environment..." |
|
|
|
setup_build_env "web" |
|
|
|
# Test 2: Web environment (development) |
|
|
|
log_info "Test 2: Setting up Web environment (development mode)..." |
|
|
|
setup_build_env "web" "development" |
|
|
|
print_env_vars "VITE_" |
|
|
|
echo "" |
|
|
|
|
|
|
|
# Test 3: Production Capacitor environment |
|
|
|
log_info "Test 3: Setting up Production Capacitor environment..." |
|
|
|
setup_build_env "capacitor" "true" |
|
|
|
# Test 3: Capacitor test environment |
|
|
|
log_info "Test 3: Setting up Capacitor environment (test mode)..." |
|
|
|
setup_build_env "capacitor" "test" |
|
|
|
print_env_vars "VITE_" |
|
|
|
echo "" |
|
|
|
|
|
|
|
# Test 4: Application directories |
|
|
|
log_info "Test 4: Setting up application directories..." |
|
|
|
# Test 4: Capacitor production environment |
|
|
|
log_info "Test 4: Setting up Capacitor environment (production mode)..." |
|
|
|
setup_build_env "capacitor" "production" |
|
|
|
print_env_vars "VITE_" |
|
|
|
echo "" |
|
|
|
|
|
|
|
# Test 5: Application directories |
|
|
|
log_info "Test 5: Setting up application directories..." |
|
|
|
setup_app_directories |
|
|
|
|
|
|
|
# Test 5: Load .env file (if it exists) |
|
|
|
log_info "Test 5: Loading .env file..." |
|
|
|
# Test 6: Load .env file (if it exists) |
|
|
|
log_info "Test 6: Loading .env file..." |
|
|
|
load_env_file ".env" |
|
|
|
|
|
|
|
# Test 6: Git hash |
|
|
|
log_info "Test 6: Getting git hash..." |
|
|
|
# Test 7: Git hash |
|
|
|
log_info "Test 7: Getting git hash..." |
|
|
|
GIT_HASH=$(get_git_hash) |
|
|
|
log_info "Git hash: $GIT_HASH" |
|
|
|
|
|
|
|