migration: move to bash based build scripts

This commit is contained in:
Matthew Raymer
2025-06-24 11:11:33 +00:00
parent d359263704
commit 94ac7d648d
34 changed files with 3350 additions and 571 deletions

59
scripts/test-env.sh Executable file
View File

@@ -0,0 +1,59 @@
#!/bin/bash
# test-env.sh
# Author: Matthew Raymer
# Description: Test script to verify environment variable handling
# This script tests the environment variable setup functions.
# Exit on any error
set -e
# Source common utilities
source "$(dirname "$0")/common.sh"
# Parse command line arguments
parse_args "$@"
# Print test header
print_header "Environment Variable Test"
log_info "Testing environment variable handling at $(date)"
# Test 1: Electron environment
log_info "Test 1: Setting up Electron environment..."
setup_build_env "electron"
print_env_vars "VITE_"
# Test 2: Capacitor environment
log_info "Test 2: Setting up Capacitor environment..."
setup_build_env "capacitor"
print_env_vars "VITE_"
# Test 3: Web environment
log_info "Test 3: Setting up Web environment..."
setup_build_env "web"
print_env_vars "VITE_"
# Test 4: Production Electron environment
log_info "Test 4: Setting up Production Electron environment..."
setup_build_env "electron" "true"
print_env_vars "VITE_"
print_env_vars "NODE_ENV"
# Test 5: Application directories
log_info "Test 5: Setting up application directories..."
setup_app_directories
# Test 6: Load .env file (if it exists)
log_info "Test 6: Loading .env file..."
load_env_file ".env"
# Test 7: Git hash
log_info "Test 7: Getting git hash..."
GIT_HASH=$(get_git_hash)
log_info "Git hash: $GIT_HASH"
# Print test summary
log_success "All environment variable tests completed successfully!"
print_footer "Environment Variable Test"
# Exit with success
exit 0