mirror of
https://github.com/dbt-labs/dbt-core
synced 2025-12-17 19:31:34 +00:00
17 lines
385 B
Bash
Executable File
17 lines
385 B
Bash
Executable File
#!/bin/bash -e
|
|
set -e
|
|
|
|
# this is used in dbt-common for CI
|
|
|
|
repo=$1
|
|
ref=$2
|
|
target_req_file="core/hatch.toml"
|
|
|
|
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
|