mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 21:07:18 +00:00
82f25bacf2
* most issues resolved * fuzz wrapper fixes * more deepsource * more shell * export * shell * combine func params, fix go deep source issues Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
30 lines
989 B
Bash
Executable File
30 lines
989 B
Bash
Executable File
#!/bin/bash
|
|
. "$(dirname "$0")"/common.sh
|
|
|
|
# Script to copy pb.go files from bazel build folder to appropriate location.
|
|
# Bazel builds to bazel-bin/... folder, script copies them back to original folder where .proto is.
|
|
|
|
bazel build //proto/...
|
|
|
|
file_list=()
|
|
while IFS= read -d $'\0' -r file; do
|
|
file_list=("${file_list[@]}" "$file")
|
|
done < <($findutil -L "$(bazel info bazel-bin)"/proto -type f -regextype sed -regex ".*pb\.\(gw\.\)\?go$" -print0)
|
|
|
|
arraylength=${#file_list[@]}
|
|
searchstring="prysmaticlabs/prysm/"
|
|
|
|
# Copy pb.go files from bazel-bin to original folder where .proto is.
|
|
for ((i = 0; i < arraylength; i++)); do
|
|
color "34" "$destination"
|
|
destination=${file_list[i]#*$searchstring}
|
|
chmod 755 "$destination"
|
|
cp -R -L "${file_list[i]}" "$destination"
|
|
done
|
|
|
|
# Run goimports on newly generated protos until gogo protobuf's proto-gen-go
|
|
# formats imports properly.
|
|
# https://github.com/gogo/protobuf/issues/554
|
|
goimports -w proto/**/*.pb.go
|
|
gofmt -s -w proto/
|