Skip to content

Commit 309ac77

Browse files
committed
tools: opentelemetry-cpp updater fix
To retrieve the opentelemetry-proto version from the MODULE.bazel file. PR-URL: #260 Reviewed-By: Juan José Arboleda <[email protected]> PR-URL: #268
1 parent ea03c10 commit 309ac77

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/dep_updaters/update-opentelemetry-cpp.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ for dir in *; do
6464
[ "$dir" = "sdk" ] || \
6565
[ "$dir" = "third_party" ] || \
6666
[ "$dir" = "LICENSE" ] || \
67+
[ "$dir" = "MODULE.bazel" ] || \
6768
[ "$dir" = "third_party_release" ]; then
6869
continue
6970
fi
@@ -85,7 +86,7 @@ curl -sL -o "$PROTOC_ZIP" "https://github.com/protocolbuffers/protobuf/releases/
8586
unzip -o "$PROTOC_ZIP" -d ./protoc/
8687

8788
echo "Getting opentelemetry-proto files"
88-
OTEL_PROTO_VERSION=$(grep "opentelemetry-proto" "opentelemetry-cpp/third_party_release" | awk -F"=v" '{print $2}')
89+
OTEL_PROTO_VERSION=$(grep "opentelemetry-proto" "opentelemetry-cpp/MODULE.bazel" | sed -n 's/.*version = "\([^"]*\)".*/\1/p')
8990
OTEL_PROTO_TARBALL=v$OTEL_PROTO_VERSION.tar.gz
9091

9192
curl -sL -o "$OTEL_PROTO_TARBALL" "https://github.com/open-telemetry/opentelemetry-proto/archive/refs/tags/$OTEL_PROTO_TARBALL"

0 commit comments

Comments
 (0)