From d49634aa70c06284919ffd99e537226dbeecb193 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 3 Feb 2021 13:29:38 -0800 Subject: [PATCH] Sync eng/common directory with azure-sdk-tools for PR 1364 (#18394) * Support sub directory for artifact location * Fix as per review comment to avoid artifact sub path * Package property file is not created for track1 and management pacakges. * Fix property name case * Fix as per review comments * Fix as per review comments * Use Config File param value as is * Change to make path joineasily readable Co-authored-by: praveenkuttappan --- eng/common/scripts/Create-APIReview.ps1 | 11 +++++++---- eng/common/scripts/Save-Package-Properties.ps1 | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/eng/common/scripts/Create-APIReview.ps1 b/eng/common/scripts/Create-APIReview.ps1 index 210b82d4f69bc..1cef3141337e0 100644 --- a/eng/common/scripts/Create-APIReview.ps1 +++ b/eng/common/scripts/Create-APIReview.ps1 @@ -8,7 +8,8 @@ Param ( [string] $APIKey, [Parameter(Mandatory=$True)] [string] $APILabel, - [string] $PackageName = "" + [string] $PackageName, + [string] $ConfigFileDir = "" ) @@ -82,17 +83,19 @@ else } $FoundFailure = $False -$pkgInfoPath = Join-Path -Path $ArtifactPath "PackageInfo" +if (-not $ConfigFileDir) +{ + $ConfigFileDir = Join-Path -Path $ArtifactPath "PackageInfo" +} foreach ($pkgName in $responses.Keys) { $respCode = $responses[$pkgName] if ($respCode -ne '200') { - $pkgPropPath = Join-Path -Path $pkgInfoPath ($PackageName + ".json") + $pkgPropPath = Join-Path -Path $ConfigFileDir "$PackageName.json" if (-Not (Test-Path $pkgPropPath)) { Write-Host " Package property file path $($pkgPropPath) is invalid." - $FoundFailure = $True } else { diff --git a/eng/common/scripts/Save-Package-Properties.ps1 b/eng/common/scripts/Save-Package-Properties.ps1 index b78e3342efe0b..a433b32d805ab 100644 --- a/eng/common/scripts/Save-Package-Properties.ps1 +++ b/eng/common/scripts/Save-Package-Properties.ps1 @@ -13,7 +13,7 @@ if ($allPackageProperties) New-Item -ItemType Directory -Force -Path $outDirectory foreach($pkg in $allPackageProperties) { - if ($pkg.IsNewSDK) + if ($pkg.IsNewSdk) { Write-Host "Package Name: $($pkg.Name)" Write-Host "Package Version: $($pkg.Version)"