forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev
More file actions
executable file
·20 lines (18 loc) · 765 Bytes
/
dev
File metadata and controls
executable file
·20 lines (18 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env bash
set -uo pipefail
this_dir=$(cd "$(dirname "$0")" && pwd)
mkdir -p $this_dir/artifacts
bazel build //pkg/cmd/dev &> $this_dir/artifacts/dev.log
status=$?
if [ $status -eq 0 ]
then
$(bazel info bazel-bin)/pkg/cmd/dev/dev_/dev "$@"
else
echo 'Failed to build pkg/cmd/dev! Got output:'
cat $this_dir/artifacts/dev.log
echo 'Hint: if the full `dev` build is failing for you, you can build a minimal version with --config nonogo.'
echo 'Afterward, run `dev doctor` to debug your failing build. For example:'
echo ' bazel build pkg/cmd/dev --config nonogo && _bazel/bin/pkg/cmd/dev/dev_/dev doctor'
echo 'When `dev doctor` says you are ready to build, try re-building the full binary with `./dev`.'
exit $status
fi