Merge branch 'feature/v3' into body-number-decimal-range-test-fix

This commit is contained in:
Michael Yanni 2020-04-28 14:43:42 -07:00
Родитель 0d92a1de24 0352c556ae
Коммит 2565a2f40f
2 изменённых файлов: 17 добавлений и 17 удалений

Просмотреть файл

@ -11,7 +11,7 @@ $repoRoot = Resolve-Path (Join-Path $PSScriptRoot '..')
$swaggerDefinitions = @{};
# Test server test configuration
$autorestPluginProject = (Get-AutorestProject)
$autoRestPluginProject = (Get-AutoRestProject)
$testServerDirectory = Join-Path $repoRoot 'test' 'TestServerProjects'
$sharedSource = Join-Path $repoRoot 'src' 'assets'
$configurationPath = Join-Path $repoRoot 'readme.md'
@ -133,7 +133,7 @@ if (!($Exclude -contains "SmokeTests"))
if ($updateLaunchSettings)
{
$launchSettings = Join-Path $autorestPluginProject 'Properties' 'launchSettings.json'
$launchSettings = Join-Path $autoRestPluginProject 'Properties' 'launchSettings.json'
$settings = @{
'profiles' = [ordered]@{}
};
@ -156,12 +156,12 @@ if ($updateLaunchSettings)
if ($reset -or $env:TF_BUILD)
{
Autorest-Reset;
AutoRest-Reset;
}
if (!$noBuild)
{
Invoke "dotnet build $autorestPluginProject"
Invoke "dotnet build $autoRestPluginProject"
}
$keys = $swaggerDefinitions.Keys | Sort-Object;
@ -181,6 +181,6 @@ if (![string]::IsNullOrWhiteSpace($filter))
$keys | %{ $swaggerDefinitions[$_] } | ForEach-Object -Parallel {
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

Просмотреть файл

@ -1,6 +1,6 @@
$repoRoot = Resolve-Path (Join-Path $PSScriptRoot '..')
$autorestBinary = Join-Path $repoRoot 'node_modules' '.bin' 'autorest-beta'
$AutorestPluginProject = Resolve-Path (Join-Path $repoRoot 'src' 'AutoRest.CSharp.V3')
$autoRestBinary = Join-Path $repoRoot 'node_modules' '.bin' 'autorest-beta'
$AutoRestPluginProject = Resolve-Path (Join-Path $repoRoot 'src' 'AutoRest.CSharp.V3')
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
$namespace = $projectName.Replace('-', '_')
$command = "$script:autorestBinary $autoRestArguments --namespace=$namespace --output-folder=$outputPath"
$command = "$script:autoRestBinary $autoRestArguments --namespace=$namespace --output-folder=$outputPath"
if ($fast)
{
$command = "dotnet run --project $script:AutorestPluginProject --no-build -- --standalone $outputPath"
$command = "dotnet run --project $script:AutoRestPluginProject --no-build -- --standalone $outputPath"
}
if ($clean)
@ -46,17 +46,17 @@ function Invoke-Autorest($baseOutput, $projectName, $autoRestArguments, $sharedS
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-Autorest"
Export-ModuleMember -Function "Autorest-Reset"
Export-ModuleMember -Function "Get-AutorestProject"
Export-ModuleMember -Function "Invoke-AutoRest"
Export-ModuleMember -Function "AutoRest-Reset"
Export-ModuleMember -Function "Get-AutoRestProject"