File size: 3,192 Bytes
61d29fc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/bash

# Verification script for HuggingFace deployment
# This checks if the new HTTPS fix is live on production

echo "πŸ” Checking HuggingFace deployment status..."
echo ""

# Check if the new JS bundle is being served
echo "1️⃣ Checking main page..."
RESPONSE=$(curl -s https://www.communityone.com/)

if echo "$RESPONSE" | grep -q "index-SmPxj_Wp.js"; then
    echo "βœ… NEW version deployed! (index-SmPxj_Wp.js found)"
    NEW_VERSION=true
elif echo "$RESPONSE" | grep -q "index-4CPp14-T.js"; then
    echo "❌ OLD version still running (index-4CPp14-T.js found)"
    echo "   HuggingFace is still building. Wait 5-10 more minutes."
    NEW_VERSION=false
else
    echo "⚠️  Unknown version. Check manually:"
    echo "$RESPONSE" | grep -o 'index-[^"]*\.js' | head -1
    NEW_VERSION=false
fi

echo ""

# Check if the API is responding
echo "2️⃣ Checking API health..."
API_RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" https://www.communityone.com/api/health)

if [ "$API_RESPONSE" = "200" ]; then
    echo "βœ… API is healthy (HTTP $API_RESPONSE)"
else
    echo "❌ API returned HTTP $API_RESPONSE"
fi

echo ""

# Final instructions
if [ "$NEW_VERSION" = true ]; then
    echo "════════════════════════════════════════════════════"
    echo "βœ… New version is LIVE!"
    echo "════════════════════════════════════════════════════"
    echo ""
    echo "To clear your browser cache and load the new code:"
    echo ""
    echo "  Chrome/Edge/Firefox (Windows/Linux):"
    echo "    Press: Ctrl + Shift + R"
    echo ""
    echo "  Safari/Chrome (Mac):"
    echo "    Press: Cmd + Shift + R"
    echo ""
    echo "  Alternative:"
    echo "    1. Open DevTools (F12)"
    echo "    2. Right-click the refresh button"
    echo "    3. Select 'Empty Cache and Hard Reload'"
    echo ""
    echo "After hard refresh, you should see:"
    echo "  - No mixed content errors"
    echo "  - Console shows: index-SmPxj_Wp.js"
    echo "════════════════════════════════════════════════════"
else
    echo "════════════════════════════════════════════════════"
    echo "⏳ Deployment still in progress"
    echo "════════════════════════════════════════════════════"
    echo ""
    echo "HuggingFace is still building the new version."
    echo "This usually takes 10-15 minutes."
    echo ""
    echo "Monitor the build at:"
    echo "  https://huggingface.co/spaces/CommunityOne/www.communityone.com"
    echo ""
    echo "Run this script again in 5 minutes to check status."
    echo "════════════════════════════════════════════════════"
fi