-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconductor-setup.sh
More file actions
executable file
·30 lines (24 loc) · 1.01 KB
/
conductor-setup.sh
File metadata and controls
executable file
·30 lines (24 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
set -e
echo "🚀 Setting up React on Rails workspace..."
# Note: This project requires Ruby 3.4.6.
# Please ensure you have the correct Ruby version active before running this script.
# Copy environment files if they exist in the root
if [ -f "$CONDUCTOR_ROOT_PATH/.env" ]; then
cp "$CONDUCTOR_ROOT_PATH/.env" .env
echo "✅ Copied .env file from root"
elif [ -f "$CONDUCTOR_ROOT_PATH/.env.example" ]; then
cp "$CONDUCTOR_ROOT_PATH/.env.example" .env
echo "✅ Copied .env.example to .env"
fi
if [ -f "$CONDUCTOR_ROOT_PATH/config/database.yml" ]; then
cp "$CONDUCTOR_ROOT_PATH/config/database.yml" config/database.yml
echo "✅ Copied database.yml from root"
elif [ -f "config/database.yml.example" ]; then
cp config/database.yml.example config/database.yml
echo "✅ Copied database.yml.example to database.yml"
fi
# Run the standard Rails setup script
echo "🔧 Running Rails setup script..."
bin/setup --skip-server
echo "✨ Setup complete! You can now run the development server."