Spaces:
Sleeping
Sleeping
File size: 687 Bytes
de7b5f1 de66cf1 de7b5f1 de66cf1 de7b5f1 de66cf1 de7b5f1 de66cf1 |
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 |
#!/bin/bash
echo "π Checking for changes..."
if [[ -n $(git status -s) ]]; then
echo "β
Changes detected, committing..."
git add .
# Prompt for commit message
read -p "π Commit message (press Enter for default): " commit_msg
if [ -z "$commit_msg" ]; then
commit_msg="Update $(date '+%Y-%m-%d %H:%M')"
fi
git commit -m "$commit_msg"
else
echo "β
No changes to commit"
fi
echo ""
echo "π Pushing to GitHub..."
git push origin main
echo ""
echo "π Pushing to Hugging Face Spaces..."
git push huggingface main --force
echo ""
echo "β
Successfully pushed to both GitHub and Hugging Face!"
EOF
chmod +x push-both.sh |