agb/.github/scripts/update-lockfiles.sh

22 lines
439 B
Bash
Raw Normal View History

#!/usr/bin/env bash
function update_lockfiles() {
2022-02-25 09:03:13 +11:00
find . -name Cargo.lock -execdir cargo update \;
}
update_lockfiles
update_lockfiles
update_lockfiles
update_lockfiles
2023-08-07 06:06:29 +10:00
if [ "$1" == '--commit' ]; then
git add -u
2022-02-25 07:30:15 +11:00
2023-08-07 06:06:29 +10:00
if [ "$(git diff --cached --name-only)" == '' ]; then
echo "No files updated"
exit 0
fi
2022-02-25 07:30:15 +11:00
git -c user.name="GBA bot" -c user.email="gw@ilym.me" commit -m 'Update lockfiles'
git push
fi