From 7e268ba8cef5e0b72f176618e949e4042514af45 Mon Sep 17 00:00:00 2001 From: Gwilym Kuiper Date: Sun, 15 Aug 2021 23:12:18 +0100 Subject: [PATCH] Update agb's cargo.toml when updating a dependency --- release.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/release.sh b/release.sh index 6083308d..991ca66c 100755 --- a/release.sh +++ b/release.sh @@ -70,6 +70,12 @@ if [ "$PROJECT" = "agb" ]; then # also update the agb version in the template sed -i -e "s/^agb = \".*\"/agb = \"$VERSION\"/" 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 # Commit the Cargo.toml changes