mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-25 01:01:34 +11:00
Update agb's cargo.toml when updating a dependency
This commit is contained in:
parent
fcce9bd5c5
commit
7e268ba8ce
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue