Rebrand from MyCrib to Casera
- Rename Kotlin package from com.example.mycrib to com.example.casera - Update Android app name, namespace, and application ID - Update iOS bundle identifiers and project settings - Rename iOS directories (MyCribTests -> CaseraTests, etc.) - Update deep link schemes from mycrib:// to casera:// - Update app group identifiers - Update subscription product IDs - Update all UI strings and branding 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
57
iosApp/CaseraUITests/Scripts/get_verification_code.sh
Executable file
57
iosApp/CaseraUITests/Scripts/get_verification_code.sh
Executable file
@@ -0,0 +1,57 @@
|
||||
#!/bin/bash
|
||||
# Script to fetch verification code from Django database
|
||||
# Usage: ./get_verification_code.sh <email>
|
||||
# Output: Writes the verification code to /tmp/mycrib_verification_code_<sanitized_email>.txt
|
||||
|
||||
EMAIL="$1"
|
||||
|
||||
if [ -z "$EMAIL" ]; then
|
||||
echo "Usage: $0 <email>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Sanitize email for filename
|
||||
SANITIZED_EMAIL=$(echo "$EMAIL" | sed 's/@/_at_/g' | sed 's/\./_dot_/g')
|
||||
OUTPUT_FILE="/tmp/mycrib_verification_code_${SANITIZED_EMAIL}.txt"
|
||||
|
||||
cd /Users/treyt/Desktop/code/MyCrib/myCribAPI
|
||||
|
||||
# Try docker exec first (if running in Docker)
|
||||
if docker ps --format '{{.Names}}' | grep -q 'mycrib-web\|myCrib-web'; then
|
||||
CONTAINER_NAME=$(docker ps --format '{{.Names}}' | grep -E 'mycrib-web|myCrib-web' | head -1)
|
||||
CODE=$(docker exec "$CONTAINER_NAME" python manage.py shell -c "
|
||||
from user.models import ConfirmationCode
|
||||
from django.contrib.auth import get_user_model
|
||||
User = get_user_model()
|
||||
try:
|
||||
user = User.objects.get(email='$EMAIL')
|
||||
code = ConfirmationCode.objects.filter(user=user, is_used=False).latest('created_at')
|
||||
print(code.code)
|
||||
except Exception as e:
|
||||
print('ERROR:', e)
|
||||
" 2>/dev/null)
|
||||
else
|
||||
# Fallback to local Python
|
||||
export DJANGO_SETTINGS_MODULE=myCrib.settings
|
||||
CODE=$(python manage.py shell -c "
|
||||
from user.models import ConfirmationCode
|
||||
from django.contrib.auth import get_user_model
|
||||
User = get_user_model()
|
||||
try:
|
||||
user = User.objects.get(email='$EMAIL')
|
||||
code = ConfirmationCode.objects.filter(user=user, is_used=False).latest('created_at')
|
||||
print(code.code)
|
||||
except Exception as e:
|
||||
print('ERROR:', e)
|
||||
" 2>/dev/null)
|
||||
fi
|
||||
|
||||
# Check if we got a valid 6-digit code
|
||||
if [[ "$CODE" =~ ^[0-9]{6}$ ]]; then
|
||||
echo "$CODE" > "$OUTPUT_FILE"
|
||||
echo "Verification code saved to $OUTPUT_FILE: $CODE"
|
||||
exit 0
|
||||
else
|
||||
echo "Failed to get verification code: $CODE"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user