mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 17:10:48 +01:00
a073869fa1
GitOrigin-RevId: 0b7decbeb9190d3d30de3f11813745ff9b213f0f
22 lines
876 B
Bash
Executable File
22 lines
876 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Whenever Bazel is invoked, it first calls this script setting "BAZEL_REAL" to the path of the real Bazel binary.
|
|
# Use this file as a wrapper for any logic that should run before bazel itself is executed.
|
|
|
|
if [[ -z "${BAZELISK_SKIP_WRAPPER}" ]]; then
|
|
echo "You're not using Bazelisk, which is recommended for a consistent build environment." >&2
|
|
echo "Your version of Bazel may be mismatched with the version intended to be used to build MongoDB." >&2
|
|
echo "Please run the following command to install Bazelisk:" >&2
|
|
echo "" >&2
|
|
echo "python buildscripts/install_bazel.py" >&2
|
|
exit 0
|
|
fi
|
|
|
|
# TODO(SERVER-96398): Apply this to Windows when we find a way to do perfect argument forwarding
|
|
# in a batch file.
|
|
if [ -d .git ]; then
|
|
echo "build --define GIT_COMMIT_HASH=$(git rev-parse HEAD)" > .bazelrc.gitinfo
|
|
fi
|
|
|
|
$BAZEL_REAL "$@"
|