File size: 3,238 Bytes
5fd9547
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
78
79
80
81
82
83
84
85
#!/bin/bash

echo "════════════════════════════════════════════════════"
echo "  Push to HuggingFace Spaces + GitHub"
echo "════════════════════════════════════════════════════"
echo ""

cd /Users/hetalksinmaths/togmal/Togmal-demo

# Stage files
echo "πŸ“¦ Staging files..."
git add app_combined.py QUICK_PUSH.txt

# Commit
echo "πŸ’Ύ Committing..."
git commit -m "Fix chat: Format tool results directly for reliability" || echo "Nothing new to commit"

# Check remotes
echo ""
echo "πŸ” Checking configured remotes..."
git remote -v

echo ""
echo "════════════════════════════════════════════════════"
echo "  Push 1/2: HuggingFace Spaces"
echo "════════════════════════════════════════════════════"
echo ""

# Push to HuggingFace (origin)
git push origin main

if [ $? -eq 0 ]; then
    echo ""
    echo "βœ… HuggingFace push successful!"
    echo "🌐 Demo: https://huggingface.co/spaces/JustTheStatsHuman/Togmal-demo"
    echo "πŸ“Š Logs: https://huggingface.co/spaces/JustTheStatsHuman/Togmal-demo/logs"
else
    echo ""
    echo "❌ HuggingFace push failed!"
fi

echo ""
echo "════════════════════════════════════════════════════"
echo "  Push 2/2: GitHub"
echo "════════════════════════════════════════════════════"
echo ""

# Check if github remote exists
if git remote | grep -q "github"; then
    echo "πŸ“€ Pushing to GitHub remote..."
    git push github main
    
    if [ $? -eq 0 ]; then
        echo ""
        echo "βœ… GitHub push successful!"
        echo "πŸ™ GitHub: https://github.com/HeTalksInMaths/togmal-mcp"
    else
        echo ""
        echo "❌ GitHub push failed!"
        echo "πŸ’‘ You may need to set up authentication"
    fi
else
    echo "ℹ️  Setting up GitHub remote..."
    git remote add github https://github.com/HeTalksInMaths/togmal-mcp.git
    
    echo "πŸ“€ Pushing to GitHub..."
    git push -u github main
    
    if [ $? -eq 0 ]; then
        echo ""
        echo "βœ… GitHub remote added and pushed successfully!"
        echo "πŸ™ GitHub: https://github.com/HeTalksInMaths/togmal-mcp"
    else
        echo ""
        echo "❌ GitHub push failed!"
        echo "πŸ’‘ You may need to authenticate (use PAT as password)"
        echo "   Get PAT at: https://github.com/settings/tokens"
    fi
fi

echo ""
echo "════════════════════════════════════════════════════"
echo "  βœ… Done!"
echo "════════════════════════════════════════════════════"