Skip to content

Commit

Permalink
Add update-client script
Browse files Browse the repository at this point in the history
  • Loading branch information
hallipr committed Mar 11, 2024
1 parent 3a22d73 commit 3b8933b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
21 changes: 21 additions & 0 deletions .dotnet/scripts/Update-Client.ps1
Original file line number Diff line number Diff line change
@@ -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
}
2 changes: 0 additions & 2 deletions .dotnet/src/OpenAI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>latest</LangVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>sgKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 3b8933b

Please sign in to comment.