Also only git add if passed --commit

This commit is contained in:
Gwilym Inzani 2023-08-06 21:06:29 +01:00
parent 6607ea3f1f
commit b8ceb26bff

View file

@ -9,6 +9,7 @@ update_lockfiles
update_lockfiles update_lockfiles
update_lockfiles update_lockfiles
if [ "$1" == '--commit' ]; then
git add -u git add -u
if [ "$(git diff --cached --name-only)" == '' ]; then if [ "$(git diff --cached --name-only)" == '' ]; then
@ -16,7 +17,6 @@ if [ "$(git diff --cached --name-only)" == '' ]; then
exit 0 exit 0
fi fi
if [ "$1" == '--commit' ]; then
git -c user.name="GBA bot" -c user.email="gw@ilym.me" commit -m 'Update lockfiles' git -c user.name="GBA bot" -c user.email="gw@ilym.me" commit -m 'Update lockfiles'
git push git push
fi fi