Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dev tool setup script to address Firebase emulator error #95

Merged
merged 5 commits into from
Jan 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions Scripts/setup.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,36 @@ brew upgrade


# 3. Test and start the firebase emulator

# Check if firebase.json exists and create if it doesn't
CREATED_FIREBASE_JSON=false

if [ ! -f "firebase.json" ]; then
echo "Creating firebase.json file..."
CREATED_FIREBASE_JSON=true
cat << 'EOL' > firebase.json
{
"emulators": {
"auth": {
"port": 9099
},
"firestore": {
"port": 8080
},
"ui": {
"enabled": true,
"port": 4000
},
"singleProjectMode": true
}
}
EOL
fi

firebase emulators:exec --project test "echo 'Firebase emulator installed and started successfully!'"

# Clean up the firebase.json file only if we created it
if [ "$CREATED_FIREBASE_JSON" = true ]; then
echo "Cleaning up temporary firebase.json file..."
rm firebase.json
fi
Loading