From 35852567a0ba77a060b8b5a5324e8cb6c33d5704 Mon Sep 17 00:00:00 2001 From: yedf2 <120050102@qq.com> Date: Sun, 10 Jul 2022 21:35:58 +0800 Subject: [PATCH] sync-client partial --- helper/sync-client.sh | 38 +++++++++++++++++++++++++++++ helper/sync-dtmcli.sh | 57 ------------------------------------------- 2 files changed, 38 insertions(+), 57 deletions(-) create mode 100755 helper/sync-client.sh delete mode 100755 helper/sync-dtmcli.sh diff --git a/helper/sync-client.sh b/helper/sync-client.sh new file mode 100755 index 0000000..5d34206 --- /dev/null +++ b/helper/sync-client.sh @@ -0,0 +1,38 @@ +#! /bin/bash +set -x +ver=$1 +if [ x$ver == x ]; then + echo please specify you version like vx.x.x; + exit 1; +fi + +if [ ${ver:0:1} != v ]; then + echo please specify you version like vx.x.x; + exit 1; +fi + +cd ../client +cp -rf ../dtm/client/* ./ +sed -i '' -e 's/dtm-labs\/dtm\//dtm-labs\//g' */*.go */*/*.go + +rm -rf */*_test.go */*/*_test.go */*log */*/*log +go mod tidy +go build || exit 1 + +echo "user exit" +exit 0 +git add . +git commit -m"update from dtm to version $ver" +git push +git tag $ver +git push --tags + +cd ../quick-start-sample + +go get -u github.com/dtm-labs/client@$ver +go mod tidy +go build || exit 1 +git add . +git commit -m"update from dtm to version $ver" +git push + diff --git a/helper/sync-dtmcli.sh b/helper/sync-dtmcli.sh deleted file mode 100755 index 0345137..0000000 --- a/helper/sync-dtmcli.sh +++ /dev/null @@ -1,57 +0,0 @@ -#! /bin/bash -set -x -ver=$1 -if [ x$ver == x ]; then - echo please specify you version like vx.x.x; - exit 1; -fi - -if [ ${ver:0:1} != v ]; then - echo please specify you version like vx.x.x; - exit 1; -fi - -cd ../dtmcli -cp -rf ../dtm/dtmcli/* ./ -rm -f *_test.go logger/*.log -sed -i '' -e 's/dtm-labs\/dtm\//dtm-labs\//g' *.go */**.go -go mod tidy -go build || exit 1 -git add . -git commit -m"update from dtm to version $ver" -git push -git tag $ver -git push --tags - -cd ../dtmcli-go-sample -go get -u github.com/dtm-labs/dtmcli@$ver -go mod tidy -go build || exit 1 -git add . -git commit -m"update from dtm to version $ver" -git push - - -cd ../dtmgrpc -rm -rf *.go dtmgimp -cp -r ../dtm/dtmgrpc/* ./ -go get github.com/dtm-labs/dtmcli@$ver -sed -i '' -e 's/dtm-labs\/dtm\//dtm-labs\//g' *.go */**.go -rm -rf *_test.go -rm -rf workflow/*_test.go -go mod tidy -go build || exit 1 -git add . -git commit -m"update from dtm to version $ver" -git push -git tag $ver -git push --tags - -cd ../dtmgrpc-go-sample -go get github.com/dtm-labs/dtmcli@$ver -go get github.com/dtm-labs/dtmgrpc@$ver -protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative busi/*.proto || exit 1 -go build || exit 1 -git add . -git commit -m"update from dtm to version $ver" -git push \ No newline at end of file