#!/bin/bash
set -e

rsync -a --delete --exclude .git --exclude .gitignore --exclude repo.json ../master/repo/ .
git config --global user.email "gitea@catgirlsneed.homes"
git config --global user.name "Homeless Catgirl"
git status
if [ -n "$(git status --porcelain)" ]; then
    git add .
    git commit -m "Upload APKs"
    git push
else
    echo "No changes to commit"
fi