add script to override dev dependencies in tests (#10023)

This commit is contained in:
Emily Rockman
2024-04-24 13:56:14 -05:00
committed by GitHub
parent 29429ecf7b
commit 2325759ba8
2 changed files with 15 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
git+https://github.com/dbt-labs/dbt-adapters.git
git+https://github.com/dbt-labs/dbt-adapters.git@main
git+https://github.com/dbt-labs/dbt-adapters.git@main#subdirectory=dbt-tests-adapter
git+https://github.com/dbt-labs/dbt-common.git@main
git+https://github.com/dbt-labs/dbt-postgres.git@main

14
scripts/update_dev_packages.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/bash -e
set -e
repo=$1
ref=$2
target_req_file="dev-requirements.txt"
req_sed_pattern="s|${repo}.git@main|${repo}.git@${ref}|g"
if [[ "$OSTYPE" == darwin* ]]; then
# mac ships with a different version of sed that requires a delimiter arg
sed -i "" "$req_sed_pattern" $target_req_file
else
sed -i "$req_sed_pattern" $target_req_file
fi