Skip to content

Commit

Permalink
Fix race condition when rebuilding proto files.
Browse files Browse the repository at this point in the history
Signed-off-by: Cody Littley <[email protected]>
  • Loading branch information
cody-littley committed Oct 16, 2024
1 parent 841e0db commit bee7d8d
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion api/builder/clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,22 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

API_DIR="${SCRIPT_DIR}/.."
GRPC_DIR="${API_DIR}/grpc"
find "${GRPC_DIR}" -name '*.pb.go' -type f | xargs rm -rf
# Delete all compiled protobufs
files=$(find "${GRPC_DIR}" -name '*.pb.go' -type f)
for file in $files; do
rm -rf $file
done
# Delete all empty directories
find "${GRPC_DIR}" -type d -empty -delete


DISPERSER_DIR="$SCRIPT_DIR/../../disperser"
DISPERSER_GRPC_DIR="$DISPERSER_DIR/api/grpc"
# Delete all compiled protobufs
find "${DISPERSER_GRPC_DIR}" -name '*.pb.go' -type f | xargs rm -rf
files=$(find "${DISPERSER_GRPC_DIR}" -name '*.pb.go' -type f)
for file in $files; do
rm -rf $file
done
# Delete all empty directories
find "${DISPERSER_GRPC_DIR}" -type d -empty -delete

0 comments on commit bee7d8d

Please sign in to comment.