podcraft_web_app / push_to_huggingface.sh
Nagesh Muralidhar
Initial commit of PodCraft application
0d27572
raw
history blame
1.26 kB
#!/bin/bash
set -e
echo "===> Preparing PodCraft for HuggingFace Spaces <===="
# Check if repository is initialized
if [ ! -d ".git" ]; then
echo "Initializing git repository..."
git init
fi
# Set up Git LFS
echo "Setting up Git LFS..."
git lfs install
git lfs track "*.gif" "*.png" "*.jpg" "*.jpeg" "*.mp3" "*.mp4" "*.wav" "*.ogg"
git add .gitattributes
# Configure git if needed
if ! git remote | grep -q "origin"; then
echo "Please enter your HuggingFace username:"
read username
git remote add origin "https://huggingface.co/spaces/$username/podcraft"
echo "Remote added: https://huggingface.co/spaces/$username/podcraft"
fi
# Check for large files
echo "Checking for large files (>100MB)..."
find . -type f -size +100M | while read file; do
echo "Warning: Large file detected: $file"
echo "Consider removing or excluding it from git."
done
# Prepare for commit
echo "Adding files to git..."
git add .
# Commit changes
echo "Committing changes..."
git commit -m "Update PodCraft for HuggingFace Spaces"
# Push to HuggingFace
echo "Pushing to HuggingFace Spaces..."
echo "This may take a while depending on the size of your repository."
git push -u origin main
echo "Push completed! Check your HuggingFace Space for build progress."