diff --git a/Makefile b/Makefile index e149de9..e454dc2 100755 --- a/Makefile +++ b/Makefile @@ -44,6 +44,10 @@ docker/%: --env HOME=/work \ truecloudlab/frostfs-sdk-go make $* +# Synchronize tree service +sync-tree: + @./syncTree.sh + # Show this help prompt help: @echo ' Usage:' diff --git a/pool/tree/service/service.pb.go b/pool/tree/service/service.pb.go new file mode 100644 index 0000000..08664a6 Binary files /dev/null and b/pool/tree/service/service.pb.go differ diff --git a/pool/tree/service/service_grpc.pb.go b/pool/tree/service/service_grpc.pb.go new file mode 100644 index 0000000..f981746 Binary files /dev/null and b/pool/tree/service/service_grpc.pb.go differ diff --git a/pool/tree/service/types.pb.go b/pool/tree/service/types.pb.go new file mode 100644 index 0000000..45d8891 Binary files /dev/null and b/pool/tree/service/types.pb.go differ diff --git a/syncTree.sh b/syncTree.sh new file mode 100755 index 0000000..9bb758b --- /dev/null +++ b/syncTree.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +REVISION="f07d4158f50ed5c7f44cc0bc224c3d03edf27f3b" + +echo "tree service revision ${REVISION}" + +# regexp below find all link to source code files which end with ".pb.go" and retrieve the file names +# we use `[^.]*` as non greedy workaround for `.*` +FILES=$(curl -s https://git.frostfs.info/TrueCloudLab/frostfs-node/src/commit/${REVISION}/pkg/services/tree | sed -n "s,.*\"/TrueCloudLab/frostfs-node/src/commit/${REVISION}/pkg/services/tree/\([^.]*\.pb\.go\)\".*,\1,p") + +for file in $FILES; do + if [[ $file == *"frostfs"* ]]; then + echo "skip '$file'" + continue + else + echo "sync '$file' in tree service" + fi + curl -s "https://git.frostfs.info/TrueCloudLab/frostfs-node/raw/commit/${REVISION}/pkg/services/tree/${file}" -o "./pool/tree/service/${file}" +done