mrproliu commented on code in PR #231:
URL: https://github.com/apache/skywalking-go/pull/231#discussion_r2328448712


##########
tools/protocols/pull-proto.sh:
##########
@@ -0,0 +1,84 @@
+#!/bin/bash
+set -e
+
+# -----------------------------
+# Configuration parameters
+# -----------------------------
+SUBMODULE_PATH="skywalking-data-collect-protocol"
+SUBMODULE_COMMIT="16c51358ebcf42629bf4ffdf952253971f20eb25"
+OUTPUT_BASE_DIR="../../protocols"
+
+mkdir -p "$OUTPUT_BASE_DIR"
+
+# -----------------------------
+# Initialize or update submodule
+# -----------------------------
+if [ ! -d "$SUBMODULE_PATH" ]; then
+    echo "Initializing submodule..."
+    git submodule update --init --recursive "$SUBMODULE_PATH"
+else
+    echo "Updating submodule..."
+    git submodule update --recursive "$SUBMODULE_PATH"
+fi
+
+# -----------------------------
+# Checkout submodule to specific commit
+# -----------------------------
+echo "Checking out submodule to commit $SUBMODULE_COMMIT..."
+cd "$SUBMODULE_PATH"
+git fetch --all
+git checkout "$SUBMODULE_COMMIT"
+cd - > /dev/null

Review Comment:
   You don't need to checkout, just generate the gRPC code is enough. 



##########
tools/protocols/pull-proto.sh:
##########
@@ -0,0 +1,84 @@
+#!/bin/bash
+set -e
+
+# -----------------------------
+# Configuration parameters
+# -----------------------------
+SUBMODULE_PATH="skywalking-data-collect-protocol"
+SUBMODULE_COMMIT="16c51358ebcf42629bf4ffdf952253971f20eb25"
+OUTPUT_BASE_DIR="../../protocols"
+
+mkdir -p "$OUTPUT_BASE_DIR"
+
+# -----------------------------
+# Initialize or update submodule
+# -----------------------------
+if [ ! -d "$SUBMODULE_PATH" ]; then
+    echo "Initializing submodule..."
+    git submodule update --init --recursive "$SUBMODULE_PATH"

Review Comment:
   Please remove this update, the git submodule already lock the version. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to