mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 19:40:37 +00:00
68eba02cc2
* Remove most of the remaining geth code and set up bazel for this * chmod +x * Add flake check * better flake detection Former-commit-id: 5c332ecbf2923943f646f1fe40befa95be883329 [formerly 99590fc354514584700e5ce8d7d30a8a7d541f29] Former-commit-id: e5f919b553fe698e98090965d34eb721990b5693
23 lines
606 B
Bash
Executable File
23 lines
606 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Continous Integration script to check that BUILD.bazel files are as expected
|
|
# when generated from gazelle.
|
|
|
|
# Duplicate redirect 5 to stdout so that it can be captured, but still printed
|
|
# nicely.
|
|
exec 5>&1
|
|
|
|
# Run gazelle while piping a copy of the output to stdout via 5.
|
|
changes=$(bazel run //:gazelle -- fix --mode=diff | tee >(cat - >&5))
|
|
|
|
# If the captured stdout is not empty then Gazelle has diffs.
|
|
if [ -z "$changes" ]
|
|
then
|
|
echo "OK: Gazelle does not need to be run"
|
|
exit 0
|
|
else
|
|
echo "FAIL: Gazelle needs to be run"
|
|
echo "Please run bazel run //:gazelle -- fix"
|
|
exit 1
|
|
fi
|