-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow testing against any core branch (#771)
- Loading branch information
1 parent
9fa8de2
commit 82b2acb
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash -e | ||
set -e | ||
|
||
git_branch=$1 | ||
target_req_file="dev-requirements.txt" | ||
core_req_sed_pattern="s|dbt-core.git.*#egg=dbt-core|dbt-core.git@${git_branch}#egg=dbt-core|g" | ||
postgres_req_sed_pattern="s|dbt-core.git.*#egg=dbt-postgres|dbt-core.git@${git_branch}#egg=dbt-postgres|g" | ||
tests_req_sed_pattern="s|dbt-core.git.*#egg=dbt-tests|dbt-core.git@${git_branch}#egg=dbt-tests|g" | ||
if [[ "$OSTYPE" == darwin* ]]; then | ||
# mac ships with a different version of sed that requires a delimiter arg | ||
sed -i "" "$core_req_sed_pattern" $target_req_file | ||
sed -i "" "$postgres_req_sed_pattern" $target_req_file | ||
sed -i "" "$tests_req_sed_pattern" $target_req_file | ||
else | ||
sed -i "$core_req_sed_pattern" $target_req_file | ||
sed -i "$postgres_req_sed_pattern" $target_req_file | ||
sed -i "$tests_req_sed_pattern" $target_req_file | ||
fi | ||
core_version=$(curl "https://raw.githubusercontent.com/dbt-labs/dbt-core/${git_branch}/core/dbt/version.py" | grep "__version__ = *"|cut -d'=' -f2) | ||
bumpversion --allow-dirty --new-version "$core_version" major |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters