...

Text file src/github.com/Azure/azure-sdk-for-go/eng/scripts/Create-ApiReview.ps1

Documentation: github.com/Azure/azure-sdk-for-go/eng/scripts

     1Param(
     2    [Parameter(Mandatory=$True)]
     3    [string] $ServiceDirectory,
     4    [Parameter(Mandatory=$True)]
     5    [string] $OutPath,
     6    [Parameter(Mandatory=$True)]
     7    [string] $ApiviewUri,
     8    [Parameter(Mandatory=$True)]
     9    [string] $ApiKey,
    10    [Parameter(Mandatory=$True)]
    11    [string] $ApiLabel,
    12    [Parameter(Mandatory=$True)]
    13    [string] $SourceBranch,
    14    [Parameter(Mandatory=$True)]
    15    [string] $DefaultBranch,
    16    [Parameter(Mandatory=$True)]
    17    [string] $ConfigFileDir
    18)
    19
    20
    21Write-Host "$PSScriptRoot"
    22. (Join-Path $PSScriptRoot .. common scripts common.ps1)
    23$createReviewScript = (Join-Path $PSScriptRoot .. common scripts Create-APIReview.ps1)
    24
    25foreach ($sdk in (Get-AllPackageInfoFromRepo $ServiceDirectory))
    26{
    27    Write-Host "Creating API review artifact for $($sdk.Name)"
    28    New-Item -ItemType Directory -Path $OutPath/$($sdk.Name) -force
    29    $fileName = Split-Path -Path $sdk.Name -Leaf
    30    Compress-Archive -Path $sdk.DirectoryPath -DestinationPath $outPath/$($sdk.Name)/$fileName -force
    31    Rename-Item $outPath/$($sdk.Name)/$fileName.zip -NewName "$fileName.gosource"
    32
    33    Write-Host "Send request to APIView to create review for $($sdk.Name)"
    34    &($createReviewScript) -ArtifactPath $outPath -APIViewUri $ApiviewUri -APIKey $ApiKey -APILabel $ApiLabel -PackageName $sdk.Name -SourceBranch $SourceBranch -DefaultBranch $DefaultBranch -ConfigFileDir $ConfigFileDir
    35}

View as plain text