Update agb's cargo.toml when updating a dependency

This commit is contained in:
Gwilym Kuiper 2021-08-15 23:12:18 +01:00
parent fcce9bd5c5
commit 7e268ba8ce

View file

@ -70,6 +70,12 @@ if [ "$PROJECT" = "agb" ]; then
# also update the agb version in the template # also update the agb version in the template
sed -i -e "s/^agb = \".*\"/agb = \"$VERSION\"/" template/Cargo.toml sed -i -e "s/^agb = \".*\"/agb = \"$VERSION\"/" template/Cargo.toml
git add template/Cargo.toml git add template/Cargo.toml
else
local PROJECT_NAME_WITH_UNDERSCORES=$(echo -n "$PROJECT" | tr - _)
sed -i -E -e "s/($PROJECT_NAME_WITH_UNDERSCORES = .*version = \")[^\"]+(\".*)/\1$VERSION\2/" agb/Cargo.toml
(cd agb && cargo update)
git add agb/Cargo.toml agb/Cargo.lock
fi fi
# Commit the Cargo.toml changes # Commit the Cargo.toml changes