Skip to content

Commit

Permalink
Update a specific ndc-postgres dep (#575)
Browse files Browse the repository at this point in the history
<!-- The PR description should answer 2 (maybe 3) important questions:
-->

### 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
  • Loading branch information
danieljharvey committed Aug 16, 2024
1 parent 2566620 commit bf4e8ab
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/update-multitenant-dep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down

0 comments on commit bf4e8ab

Please sign in to comment.