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