2022-02-25 07:25:44 +11:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
function update_lockfiles() {
|
2022-02-25 09:03:13 +11:00
|
|
|
find . -name Cargo.lock -execdir cargo update \;
|
2022-02-25 07:25:44 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
2023-08-07 06:04:58 +10:00
|
|
|
git -c user.name="GBA bot" -c user.email="gw@ilym.me" commit -m 'Update lockfiles'
|
|
|
|
git push
|
|
|
|
fi
|