From bf4e8abc31b535157fe8a2b581187b8e3a497a82 Mon Sep 17 00:00:00 2001 From: Daniel Harvey Date: Fri, 16 Aug 2024 16:03:00 +0100 Subject: [PATCH] Update a specific ndc-postgres dep (#575) ### What We automatically create PRs in the private multitenant repository. As that repository will contain multiple versions of `ndc-postgres` soon, only replace a specific one, matching on the crate alias. ### How Awful bash --- .github/workflows/update-multitenant-dep.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-multitenant-dep.yaml b/.github/workflows/update-multitenant-dep.yaml index 9bef6169..21ff3bd6 100644 --- a/.github/workflows/update-multitenant-dep.yaml +++ b/.github/workflows/update-multitenant-dep.yaml @@ -50,8 +50,16 @@ jobs: # Create a new feature branch for the changes. git checkout -b $BRANCH_NAME - # Update the hash to the latest version. - sed -i -e '/ndc-postgres.git/s/rev[ ]*=[ ]*"[[:alnum:]]*"/rev = "'"$LATEST_SHA"'"/g' $DEP_FILEPATH + # there will be multiple `ndc-postgres` deps, so we target a specific + # one, presumably the latest version. This will need updating as we + # add new `ndc-postgres` versions into `ndc-postgres-multitenant` + LATEST_NDC_POSTGRES_VERSION="v1_0" + + # Update the hash for ndc-postgres + sed -i -e '/ndc-postgres_${LATEST_NDC_POSTGRES_VERSION}/s/rev[ ]*=[ ]*"[[:alnum:]]*"/rev = "'"$LATEST_SHA"'"/g' $DEP_FILEPATH + + # Update the hash for ndc-postgres-configuration + sed -i -e '/ndc-postgres-configuration_${LATEST_NDC_POSTGRES_VERSION}/s/rev[ ]*=[ ]*"[[:alnum:]]*"/rev = "'"$LATEST_SHA"'"/g' $DEP_FILEPATH # ssh git access required for cargo update eval "$(ssh-agent -s)"