diff --git a/.dotnet/scripts/Update-Client.ps1 b/.dotnet/scripts/Update-Client.ps1 new file mode 100644 index 000000000..8832c2393 --- /dev/null +++ b/.dotnet/scripts/Update-Client.ps1 @@ -0,0 +1,21 @@ +$repoRoot = Join-Path $PSScriptRoot .. .. -Resolve +$dotnetFolder = Join-Path $repoRoot .dotnet + +function Invoke([scriptblock]$script) { + $scriptString = $script | Out-String + Write-Host "--------------------------------------------------------------------------------`n> $scriptString" + & $script +} + +Push-Location $repoRoot +try { + Invoke { npm ci } + Invoke { npm exec --no -- tsp compile main.tsp --emit @typespec/openapi3 } + Invoke { npm exec --no -- tsp compile main.tsp --emit @azure-tools/typespec-csharp --option @azure-tools/typespec-csharp.emitter-output-dir="$dotnetFolder" } + Invoke { .dotnet\scripts\Update-ClientModel.ps1 } + Invoke { .dotnet\scripts\ConvertTo-Internal.ps1 } + Invoke { .dotnet\scripts\Add-Customizations.ps1 } +} +finally { + Pop-Location +} diff --git a/.dotnet/src/OpenAI.csproj b/.dotnet/src/OpenAI.csproj index 2772f5e68..ed91914a5 100644 --- a/.dotnet/src/OpenAI.csproj +++ b/.dotnet/src/OpenAI.csproj @@ -7,8 +7,6 @@ netstandard2.0 latest true - true - sgKey.snk