Skip to content

Commit ae3f7de

Browse files
authored
Make sure builds executed locally don't fail (#78)
Fixes #77 The logic is as follows: - if build is *not* an RBE build: - if platform is Linux: - `apt-get install rpm` - if platform is Darwin: - `brew install rpm` - else - fail
1 parent ef96cd4 commit ae3f7de

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

ci/install-bazel-rbe.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
#!/bin/bash
22

33
set -e
4+
5+
function install_dependencies() {
6+
echo "Installing rpmbuild..."
7+
if [[ "$OSTYPE" == "linux-gnu" ]]; then
8+
sudo apt-get update
9+
sudo apt-get install rpm
10+
elif [[ "$OSTYPE" == "darwin"* ]]; then
11+
brew install rpm
12+
else
13+
echo "Your platform does not have rpmbuild executable for it. Make sure you are using Linux/macOS".
14+
exit 1
15+
fi
16+
}
17+
18+
install_dependencies
19+
420
echo "Installing RBE credential..."
521
if [[ -n "$BAZEL_RBE_CREDENTIAL" ]]; then
622
BAZEL_RBE_CREDENTIAL_LOCATION=~/.config/gcloud/application_default_credentials.json

0 commit comments

Comments
 (0)