Merge branch 'feature/v3' into body-number-decimal-range-test-fix
This commit is contained in:
Коммит
2565a2f40f
|
@ -11,7 +11,7 @@ $repoRoot = Resolve-Path (Join-Path $PSScriptRoot '..')
|
||||||
$swaggerDefinitions = @{};
|
$swaggerDefinitions = @{};
|
||||||
|
|
||||||
# Test server test configuration
|
# Test server test configuration
|
||||||
$autorestPluginProject = (Get-AutorestProject)
|
$autoRestPluginProject = (Get-AutoRestProject)
|
||||||
$testServerDirectory = Join-Path $repoRoot 'test' 'TestServerProjects'
|
$testServerDirectory = Join-Path $repoRoot 'test' 'TestServerProjects'
|
||||||
$sharedSource = Join-Path $repoRoot 'src' 'assets'
|
$sharedSource = Join-Path $repoRoot 'src' 'assets'
|
||||||
$configurationPath = Join-Path $repoRoot 'readme.md'
|
$configurationPath = Join-Path $repoRoot 'readme.md'
|
||||||
|
@ -133,7 +133,7 @@ if (!($Exclude -contains "SmokeTests"))
|
||||||
|
|
||||||
if ($updateLaunchSettings)
|
if ($updateLaunchSettings)
|
||||||
{
|
{
|
||||||
$launchSettings = Join-Path $autorestPluginProject 'Properties' 'launchSettings.json'
|
$launchSettings = Join-Path $autoRestPluginProject 'Properties' 'launchSettings.json'
|
||||||
$settings = @{
|
$settings = @{
|
||||||
'profiles' = [ordered]@{}
|
'profiles' = [ordered]@{}
|
||||||
};
|
};
|
||||||
|
@ -156,12 +156,12 @@ if ($updateLaunchSettings)
|
||||||
|
|
||||||
if ($reset -or $env:TF_BUILD)
|
if ($reset -or $env:TF_BUILD)
|
||||||
{
|
{
|
||||||
Autorest-Reset;
|
AutoRest-Reset;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$noBuild)
|
if (!$noBuild)
|
||||||
{
|
{
|
||||||
Invoke "dotnet build $autorestPluginProject"
|
Invoke "dotnet build $autoRestPluginProject"
|
||||||
}
|
}
|
||||||
|
|
||||||
$keys = $swaggerDefinitions.Keys | Sort-Object;
|
$keys = $swaggerDefinitions.Keys | Sort-Object;
|
||||||
|
@ -181,6 +181,6 @@ if (![string]::IsNullOrWhiteSpace($filter))
|
||||||
|
|
||||||
$keys | %{ $swaggerDefinitions[$_] } | ForEach-Object -Parallel {
|
$keys | %{ $swaggerDefinitions[$_] } | ForEach-Object -Parallel {
|
||||||
Import-Module "$using:PSScriptRoot\Generation.psm1" -DisableNameChecking;
|
Import-Module "$using:PSScriptRoot\Generation.psm1" -DisableNameChecking;
|
||||||
Invoke-Autorest $_.output $_.projectName $_.arguments $using:sharedSource $using:fast $using:clean;
|
Invoke-AutoRest $_.output $_.projectName $_.arguments $using:sharedSource $using:fast $using:clean;
|
||||||
} -ThrottleLimit $parallel
|
} -ThrottleLimit $parallel
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
$repoRoot = Resolve-Path (Join-Path $PSScriptRoot '..')
|
$repoRoot = Resolve-Path (Join-Path $PSScriptRoot '..')
|
||||||
$autorestBinary = Join-Path $repoRoot 'node_modules' '.bin' 'autorest-beta'
|
$autoRestBinary = Join-Path $repoRoot 'node_modules' '.bin' 'autorest-beta'
|
||||||
$AutorestPluginProject = Resolve-Path (Join-Path $repoRoot 'src' 'AutoRest.CSharp.V3')
|
$AutoRestPluginProject = Resolve-Path (Join-Path $repoRoot 'src' 'AutoRest.CSharp.V3')
|
||||||
|
|
||||||
function Invoke($command)
|
function Invoke($command)
|
||||||
{
|
{
|
||||||
|
@ -22,15 +22,15 @@ function Invoke($command)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function Invoke-Autorest($baseOutput, $projectName, $autoRestArguments, $sharedSource, $fast, $clean)
|
function Invoke-AutoRest($baseOutput, $projectName, $autoRestArguments, $sharedSource, $fast, $clean)
|
||||||
{
|
{
|
||||||
$outputPath = Join-Path $baseOutput $projectName
|
$outputPath = Join-Path $baseOutput $projectName
|
||||||
$namespace = $projectName.Replace('-', '_')
|
$namespace = $projectName.Replace('-', '_')
|
||||||
$command = "$script:autorestBinary $autoRestArguments --namespace=$namespace --output-folder=$outputPath"
|
$command = "$script:autoRestBinary $autoRestArguments --namespace=$namespace --output-folder=$outputPath"
|
||||||
|
|
||||||
if ($fast)
|
if ($fast)
|
||||||
{
|
{
|
||||||
$command = "dotnet run --project $script:AutorestPluginProject --no-build -- --standalone $outputPath"
|
$command = "dotnet run --project $script:AutoRestPluginProject --no-build -- --standalone $outputPath"
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($clean)
|
if ($clean)
|
||||||
|
@ -46,17 +46,17 @@ function Invoke-Autorest($baseOutput, $projectName, $autoRestArguments, $sharedS
|
||||||
Invoke "dotnet build $outputPath --verbosity quiet /nologo"
|
Invoke "dotnet build $outputPath --verbosity quiet /nologo"
|
||||||
}
|
}
|
||||||
|
|
||||||
function Autorest-Reset()
|
function AutoRest-Reset()
|
||||||
{
|
{
|
||||||
Invoke "$script:autorestBinary --reset"
|
Invoke "$script:autoRestBinary --reset"
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-AutorestProject()
|
function Get-AutoRestProject()
|
||||||
{
|
{
|
||||||
$AutorestPluginProject;
|
$AutoRestPluginProject;
|
||||||
}
|
}
|
||||||
|
|
||||||
Export-ModuleMember -Function "Invoke"
|
Export-ModuleMember -Function "Invoke"
|
||||||
Export-ModuleMember -Function "Invoke-Autorest"
|
Export-ModuleMember -Function "Invoke-AutoRest"
|
||||||
Export-ModuleMember -Function "Autorest-Reset"
|
Export-ModuleMember -Function "AutoRest-Reset"
|
||||||
Export-ModuleMember -Function "Get-AutorestProject"
|
Export-ModuleMember -Function "Get-AutoRestProject"
|
Загрузка…
Ссылка в новой задаче