This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch HTHou-patch-1
in repository https://gitbox.apache.org/repos/asf/iotdb-client-go.git
The following commit(s) were added to refs/heads/HTHou-patch-1 by this push:
new ae2b122 Update Makefile
ae2b122 is described below
commit ae2b122b77249cc27472aec24d5fc2065d552010
Author: Haonan <[email protected]>
AuthorDate: Wed Jul 17 04:17:08 2024 +0800
Update Makefile
---
Makefile | 27 ++++++++++++++++++---------
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/Makefile b/Makefile
index 95c9f3d..27e017a 100644
--- a/Makefile
+++ b/Makefile
@@ -23,21 +23,30 @@ generate:
exit 1; \
fi
+
+
@if [ -f
"../../iotdb-protocol/thrift-commons/src/main/thrift/common.thrift" ]; then \
- thrift -out . -gen go
../../iotdb-protocol/thrift-commons/src/main/thrift/common.thrift; \
+ cd ../..; \
+ mvn clean package -pl iotdb-protocol/thrift-datanode -am; \
+ cd iotdb-client/client-go; \
+ cp -r
../../iotdb-protocol/thrift-commons/target/generated-sources-go/common common; \
+ cp -r
../../iotdb-protocol/thrift-datanode/target/generated-sources-go/rpc rpc; \
else \
- curl -o common.thrift
https://raw.githubusercontent.com/apache/iotdb/master/iotdb-protocol/thrift-commons/src/main/thrift/common.thrift;
\
- thrift -out . -gen go common.thrift; \
- rm -f common.thrift; \
- fi
+
- @if [ -f
"../../iotdb-protocol/thrift-datanode/src/main/thrift/client.thrift" ]; then \
- thrift -out . -gen go
../../iotdb-protocol/thrift-datanode/src/main/thrift/client.thrift; \
- else \
+ echo "Downloading and unpacking iotdb-tools-thrift..."; \
+ mkdir -p thrift; \
+ curl -L -o thrift/iotdb-tools-thrift.zip
https://repo1.maven.org/maven2/org/apache/iotdb/tools/iotdb-tools-thrift/0.14.1.0/iotdb-tools-thrift-0.14.1.0-$(OS_CLASSIFIER).zip;
\
+ unzip -o thrift/iotdb-tools-thrift.zip -d thrift; \
+
+ curl -o common.thrift
https://raw.githubusercontent.com/apache/iotdb/master/iotdb-protocol/thrift-commons/src/main/thrift/common.thrift;
\
+ $(THRIFT_EXEC) -out . -gen go common.thrift; \
+ rm -f common.thrift; \
curl -o client.thrift
https://raw.githubusercontent.com/apache/iotdb/master/iotdb-protocol/thrift-datanode/src/main/thrift/client.thrift;
\
- thrift -out . -gen go client.thrift; \
+ $(THRIFT_EXEC) -out . -gen go client.thrift; \
rm -f client.thrift; \
fi
+ @rm -rf rpc/i_client_r_p_c_service-remote
.PHONY: generate all test e2e_test e2e_test_clean