Skip to content

Commit

Permalink
chore: fix build/test scripts in bin directory (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgoffredo authored Sep 15, 2024
1 parent 16cf1eb commit f8bbc8f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
11 changes: 10 additions & 1 deletion bin/bazel-build
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,13 @@ set -e

cd "$(dirname "$0")"/..

bazelisk build dd_trace_cpp
if [ "$1" = '--absl' ]; then
rcfile=.bazelrc.absl
elif [ "$1" = '--std' ]; then
rcfile=.bazelrc.std
elif [ $# -ne 1 ]; then
>&2 printf '%s: Specify one of "--absl" or "--std" build modes.\n' "$0"
exit 1
fi

bazelisk --bazelrc="$rcfile" build dd_trace_cpp
10 changes: 9 additions & 1 deletion bin/check
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ set -e
cd "$(dirname "$0")"/..

bin/format --dry-run -Werror

bin/test
bin/bazel-build

if [ "$1" != '--no-bazel' ]; then
# Specifying two different build configurations in bazel seems to trigger a
# clean build each time :(
bin/bazel-build --absl
bin/bazel-build --std
fi

find bin/ -executable -type f -print0 | xargs -0 shellcheck

0 comments on commit f8bbc8f

Please sign in to comment.