You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

14 lines
497 B

#!/bin/sh
if [[ ! -z "$(git status --porcelain --ignore-submodules -unormal)" ]]; then
echo "[bot] commit dirty changes"
git commit -m "bot update" -a
fi
if [[ "$(git rev-list --left-right --count HEAD...@'{u}' | cut -f2 )" != "0" ]]; then
echo "[bot] fetch current version"
git pull --rebase
fi
if [[ "$(git rev-list --left-right --count HEAD...@'{u}' | cut -f1 )" != "0" ]]; then
echo "[bot] push commits"
git remote | xargs -L1 git push --all
fi