prysm-pulse/hack/update-go-pbs.sh
kasey 1df173e701
Block backfilling (#12968)
* backfill service

* fix bug where origin state is never unlocked

* support mvslice states

* use renamed interface

* refactor db code to skip block cache for backfill

* lint

* add test for verifier.verify

* enable service in service init test

* cancellation cleanup

* adding nil checks to configset juggling

* assume blocks are available by default

As long as we're sure the AvailableBlocker is initialized correctly
during node startup, defaulting to assuming we aren't in a checkpoint
sync simplifies things greatly for tests.

* block saving path refactor and bugfix

* fix fillback test

* fix BackfillStatus init tests

---------

Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
2024-01-23 07:54:30 +00:00

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 query 'attr(testonly, 0, //proto/...)' | xargs bazel build $@
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/v4/"
# 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}
cp -R -L "${file_list[i]}" "$destination"
chmod 755 "$destination"
done
# Run goimports on newly generated protos
# formats imports properly.
# https://github.com/gogo/protobuf/issues/554
goimports -w proto
gofmt -s -w proto