Spaces:
Sleeping
Sleeping
File size: 1,991 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 |
#!/bin/bash
# Quick Push to HuggingFace + GitHub
# Usage: ./quick_push.sh "Your commit message"
cd /Users/hetalksinmaths/togmal/Togmal-demo
MESSAGE="${1:-Update demo}"
echo "ββββββββββββββββββββββββββββββββββββββββββββββββββββ"
echo " Quick Push: HuggingFace + GitHub"
echo "ββββββββββββββββββββββββββββββββββββββββββββββββββββ"
echo ""
echo "π Commit message: $MESSAGE"
echo ""
# Add all changes
git add .
# Commit
git commit -m "$MESSAGE" || echo "βΉοΈ Nothing new to commit"
echo ""
echo "π Pushing to both platforms..."
echo ""
# Push to HuggingFace (origin)
echo "1οΈβ£ Pushing to HuggingFace Spaces..."
git push origin main
if [ $? -eq 0 ]; then
echo " β
HuggingFace updated!"
echo " π https://huggingface.co/spaces/JustTheStatsHuman/Togmal-demo"
else
echo " β HuggingFace push failed"
fi
echo ""
# Push to GitHub
echo "2οΈβ£ Pushing to GitHub..."
# Check if github remote exists, if not add it
if ! git remote | grep -q "github"; then
echo " βΉοΈ Adding GitHub remote..."
git remote add github https://github.com/HeTalksInMaths/togmal-mcp.git
fi
git push github main
if [ $? -eq 0 ]; then
echo " β
GitHub updated!"
echo " π https://github.com/HeTalksInMaths/togmal-mcp"
else
echo " β GitHub push failed"
echo " π‘ You may need to authenticate with PAT"
echo " Get token at: https://github.com/settings/tokens"
fi
echo ""
echo "ββββββββββββββββββββββββββββββββββββββββββββββββββββ"
echo " β¨ Done!"
echo "ββββββββββββββββββββββββββββββββββββββββββββββββββββ"
|