sourcegraph/dev/bazel_configure_accept_changes.sh
James McNamara 00185f9ced
SG start bazel enhancements (#59718)
* WIP draft

* cleanup

* added output buffering

* fixed process exiting (I think)

* added bazel run targets

* ran go mod tidy and gazelle

* WIP draft

* cleanup

* added output buffering

* fixed process exiting (I think)

* added bazel run targets

* ran go mod tidy and gazelle

* fixed installing progress bar render issue

* Removed closes that were causing race conditions

* logging extracted from ibazel output

* only log first and relevant errors

* removed slow testing command
2024-02-05 20:30:06 -08:00

20 lines
500 B
Bash
Executable File

#! /bin/bash
# Run bazel configure and if the error code is 110, exit with error code 0
# This is because 110 means that configuration files were successfully
# Can be used by processes which want to run configuration as an auto-fix
# and expect a 0 exit code
bazel configure
exit_code=$?
if [ $exit_code -eq 0 ]; then
echo "No configuration changes made"
exit 0
elif [ $exit_code -eq 110 ]; then
echo "Bazel configuration completed"
exit 0
else
echo "Unknown error"
exit $exit_code
fi