sourcegraph/dev/ci/bazel.sh
Noah S-C db025265ff
shell: /bin/bash -> /usr/bin/env bash (#53000)
Changes interpreter in shell scripts to not hard-code bash location, for
portability

## Test plan

Previously `DOCKER_BAZEL=true IMAGE=strum355/frontend VERSION=5.0.5 ./enterprise/cmd/frontend/build.sh` wouldn't work for me, now it does : )
2023-06-06 13:51:55 +01:00

19 lines
498 B
Bash
Executable File

#!/usr/bin/env bash
if [[ "${CI:-false}" == "true" ]]; then
if [[ "$1" == "build" || "$1" == "test" || "$1" == "run" ]]; then
# shellcheck disable=SC2145
echo "--- :bazel: bazel $@"
fi
bazel \
--bazelrc=.bazelrc \
--bazelrc=.aspect/bazelrc/ci.bazelrc \
--bazelrc=.aspect/bazelrc/ci.sourcegraph.bazelrc \
"$@" \
--stamp \
--workspace_status_command=./dev/bazel_stamp_vars.sh \
--platforms=@io_bazel_rules_go//go/toolchain:linux_amd64
else
bazel "$@"
fi