diff --git a/helper/sync-dtmcli.sh b/helper/sync-dtmcli.sh index f399fe8..7c97b20 100755 --- a/helper/sync-dtmcli.sh +++ b/helper/sync-dtmcli.sh @@ -12,8 +12,9 @@ if [ ${ver:0:1} != v ]; then fi cd ../dtmcli -cp ../dtm/dtmcli/*.go ./ +cp -rf ../dtm/dtmcli/* ./ rm -f *_test.go +sed -i '' -e 's/yedf\/dtm\//yedf\//g' *.go go mod tidy go build || exit 1 git add . @@ -23,19 +24,22 @@ git tag $ver git push --tags cd ../dtmcli-go-sample -sleep 5 -go get -u github.com/yedf/dtmcli +go get -u github.com/yedf/dtmcli@$ver 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 -cp ../dtm/dtmgrpc/*.go ./ -cp ../dtm/dtmgrpc/*.proto ./ -go get -u github.com/yedf/dtmcli -sed -i '' -e 's/yedf\/dtm\//yedf\//g' *.go *.proto +rm -rf *.go dtmgimp +cp -r ../dtm/dtmgrpc/* ./ +go get -u github.com/yedf/dtmcli@$ver +sed -i '' -e 's/yedf\/dtm\//yedf\//g' *.go +sed -i '' -e 's/yedf\/dtm\//yedf\//g' dtmgimp/*.go dtmgimp/*.proto rm -rf *_test.go go mod tidy go build || exit 1 @@ -46,11 +50,8 @@ git tag $ver git push --tags cd ../dtmgrpc-go-sample -sleep 5 -go get -u github.com/yedf/dtmcli -go get -u github.com/yedf/dtmgrpc -cp ../dtm/dtmgrpc/*.proto ./ -sed -i '' -e 's/yedf\/dtm\//yedf\//g' *.go *.proto +go get -u github.com/yedf/dtmcli@$ver +go get -u github.com/yedf/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 .