@echo off

if not exist "./gen" (
    mkdir "./gen"
)

protoc ^
--proto_path=./sources ^
--go_out=./gen ^
--go-grpc_out=./gen ^
--grpc-gateway_out=./gen ^
--openapiv2_out=./gen ^
./sources/*.proto
xcopy "./gen/common" "../../../Server/common" /E /I /Y /Q