blob: 1ec9993166227e08ce0b02e126d4ddc5de1f9294 [file] [log] [blame]
#!/bin/bash
# Copyright 2018 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -ex
. "$(dirname "$0")/common.sh" || exit 1
main() {
if [ -z "${KOKORO_ARTIFACTS_DIR}" ]; then
echo "This script must be run in kokoro"
exit 1
fi
local src_root="${KOKORO_ARTIFACTS_DIR}"/git/cros-container-guest-tools
local result_dir="${src_root}"/guest_debs
mkdir -p "${result_dir}"
cd "${src_root}"
# Build all targets.
bazel build //...
# Copy resulting debs to results directory.
chmod 644 bazel-bin/*/*.deb
cp bazel-bin/*/*_*.deb "${result_dir}"
}
main "$@"