Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix race condition when rebuilding proto files. #813

Merged
merged 3 commits into from
Oct 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions api/builder/clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,19 @@ 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

if [ -d "${GRPC_DIR}" ]; then
# Delete all compiled protobufs
find "${GRPC_DIR}" -name '*.pb.go' -type f | xargs rm -rf
# Delete all empty directories
find "${GRPC_DIR}" -type d -empty -delete
fi

DISPERSER_DIR="$SCRIPT_DIR/../../disperser"
DISPERSER_GRPC_DIR="$DISPERSER_DIR/api/grpc"
find "${DISPERSER_GRPC_DIR}" -name '*.pb.go' -type f | xargs rm -rf
if [ -d "${DISPERSER_GRPC_DIR}" ]; then
# Delete all compiled protobufs
find "${DISPERSER_GRPC_DIR}" -name '*.pb.go' -type f | xargs rm -rf
# Delete all empty directories
find "${DISPERSER_GRPC_DIR}" -type d -empty -delete
fi
Loading