Skip to content

Commit d2a42bd

Browse files
committed
Minor improvements to the tooling shell files.
1 parent 19c2627 commit d2a42bd

File tree

5 files changed

+15
-5
lines changed

5 files changed

+15
-5
lines changed

instrumentation-genai/opentelemetry-instrumentation-google-genai/tools/build.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
SCRIPT_DIR=$(cd $(dirname "${BASH_SOURCE:-$0}"); pwd)
17+
set -o pipefail
18+
19+
SCRIPT_DIR=$(cd $(dirname "${BASH_SOURCE:-$0}") || exit; pwd)
1820
PROJECT_DIR=$(readlink -f "${SCRIPT_DIR}/..")
1921
BUILD_DIR="${PROJECT_DIR}/.build"
2022
BUILD_ENV="${BUILD_DIR}/.venv"

instrumentation-genai/opentelemetry-instrumentation-google-genai/tools/lint.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
SCRIPT_DIR=$(cd $(dirname "${BASH_SOURCE:-$0}"); pwd)
17+
set -o pipefail
18+
19+
SCRIPT_DIR=$(cd $(dirname "${BASH_SOURCE:-$0}") || exit; pwd)
1820
PROJECT_DIR=$(readlink -f "${SCRIPT_DIR}/..")
1921
BUILD_DIR="${PROJECT_DIR}/.build"
2022
LINT_ENV="${BUILD_DIR}/.lint-venv"

instrumentation-genai/opentelemetry-instrumentation-google-genai/tools/test-with-tox.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
# Runs the given tox environment, with additional parameters
3131
# to provide for more verbose debug output when testing.
3232

33+
set -o pipefail
34+
3335
function main() {
3436
local tox_env="$1"
3537
tox -e "${tox_env}" -- -o log_cli_level=debug

instrumentation-genai/opentelemetry-instrumentation-google-genai/tools/test.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
SCRIPT_DIR=$(cd $(dirname "${BASH_SOURCE:-$0}"); pwd)
17+
set -o pipefail
18+
19+
SCRIPT_DIR=$(cd $(dirname "${BASH_SOURCE:-$0}") || exit; pwd)
1820
PROJECT_DIR=$(readlink -f "${SCRIPT_DIR}/..")
1921
TOP_LEVEL_DIR=$(readlink -f "${PROJECT_DIR}/../../")
2022
TESTS_DIR="${PROJECT_DIR}/tests"
@@ -41,7 +43,7 @@ function main() {
4143
local tox_environments=$(tox -l | grep 'test-instrumentation-google-genai')
4244
local successful=0
4345
for tox_environment in ${tox_environments} ; do
44-
echo "[INFO] Testing environment: ${tox_environmenmt}" >&2
46+
echo "[INFO] Testing environment: ${tox_environment}" >&2
4547
${SCRIPT_DIR}/test-with-tox.sh "${tox_environment}"|| exit $?
4648
successful=$(expr ${successful} + 1)
4749
done

instrumentation-genai/opentelemetry-instrumentation-google-genai/tools/typecheck.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
SCRIPT_DIR=$(cd $(dirname "${BASH_SOURCE:-$0}"); pwd)
17+
set -o pipefail
18+
19+
SCRIPT_DIR=$(cd $(dirname "${BASH_SOURCE:-$0}") || exit; pwd)
1820
PROJECT_DIR=$(readlink -f "${SCRIPT_DIR}/..")
1921
TESTS_DIR="${PROJECT_DIR}/tests"
2022
REQUIREMENTS_FILE="${TESTS_DIR}/requirements.txt"

0 commit comments

Comments
 (0)