blob: 88f577e3a0f9f2e68f71fb1e5b86a7966b3bec43 [file] [log] [blame]
# Takes two arguments.
# First argument is the output directory where executables are to be placed.
# Second (optional) argument is the target platform. These are formatted as os_arch
set -x -e
# Navigate to the root of the infra checkout.
cd $(dirname ${BASH_SOURCE[0]})
cd ../..
PLATFORM=${2:-linux_amd64} # use linux_amd64 if not specified
# Build the executables and extract them to the folder in the first argument.
bazelisk build //:all_task_drivers --platforms=@io_bazel_rules_go//go/toolchain:${PLATFORM}
tar -xf _bazel_bin/built_task_drivers.tar -C ${1}
# Bazel outputs are write-protected, so we make sure everybody can write them. This way there
# are no expected errors in deleting them later.
chmod 0777 ${1}/*