Skip to content

Commit

Permalink
Support sub directory for artifact location (#1364)
Browse files Browse the repository at this point in the history
Java API review create step requires additional artifact sub directory param. This will help in using generic artifact path to look for config files.
  • Loading branch information
praveenkuttappan authored Feb 3, 2021
1 parent 212b525 commit d07059c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions eng/common/scripts/Create-APIReview.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ Param (
[string] $APIKey,
[Parameter(Mandatory=$True)]
[string] $APILabel,
[string] $PackageName = ""
[string] $PackageName,
[string] $ConfigFileDir = ""
)


Expand Down Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion eng/common/scripts/Save-Package-Properties.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down

0 comments on commit d07059c

Please sign in to comment.