Files
proto/protofile/SocketServer/gen_proto.ps1

18 lines
411 B
PowerShell

$gen = "gen"
if (!(Test-Path $gen))
{
mkdir $gen | Out-Null
}
$files = Get-ChildItem sources/*.proto | ForEach-Object { $_.Name }
protoc `
--proto_path=sources `
--go_out=$gen `
$files
$sourcePath = "$gen/git.hlsq.asia/alex/proto/proto/ss"
$targetPath = "../../proto"
Copy-Item -Path $sourcePath -Destination $targetPath -Recurse -Force
Remove-Item -Path "$gen/git.hlsq.asia" -Recurse -Force