Skip to content

Commit c7b8f78

Browse files
committed
refactor: windows shell update.
1 parent b6e3a46 commit c7b8f78

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

gen.cmd

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,21 @@
22
setlocal
33

44
rem Define array elements
5-
set "PROTO_NAMES=auth conversation errinfo friend group msg msggateway push rtc sdkws third user statistics"
5+
set "PROTO_NAMES=auth conversation errinfo friend group msg msggateway push rtc sdkws third user statistics wrapperspb"
66

77
rem Loop through each element in the array
88
for %%i in (%PROTO_NAMES%) do (
9-
protoc --go_out=plugins=grpc:./%%i --go_opt=module=github.com/openimsdk/protocol/%%i %%i/%%i.proto
9+
protoc --go_out=plugins=grpc:./%%i --go_opt=module=github.com/openimsdk/protocol/%%i %%i/%%i.proto
10+
if ERRORLEVEL 1 (
11+
echo error processing %%i.proto
12+
exit /b %ERRORLEVEL%
13+
)
1014
)
1115

16+
rem Replace "omitempty" in *.pb.go files with UTF-8 encoding
17+
for /r %%f in (*.pb.go) do (
18+
powershell -Command "(Get-Content -Path '%%f' -Encoding UTF8) -replace ',omitempty\"`"', '\"`"' | Set-Content -Path '%%f' -Encoding UTF8"
19+
)
20+
21+
1222
endlocal

0 commit comments

Comments
 (0)