Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync eng/common directory with azure-sdk-tools for PR 7200 #39565

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 29 additions & 27 deletions eng/common/scripts/Save-Package-Properties.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -101,34 +101,36 @@ if ($allPackageProperties)
}
foreach($pkg in $allPackageProperties)
{
Write-Host "Package Name: $($pkg.Name)"
Write-Host "Package Version: $($pkg.Version)"
Write-Host "Package SDK Type: $($pkg.SdkType)"
Write-Host "Artifact Name: $($pkg.ArtifactName)"
Write-Host "Release date: $($pkg.ReleaseStatus)"
$configFilePrefix = $pkg.Name
if ($pkg.ArtifactName)
{
$configFilePrefix = $pkg.ArtifactName
if ($pkg.Name) {
Write-Host "Package Name: $($pkg.Name)"
Write-Host "Package Version: $($pkg.Version)"
Write-Host "Package SDK Type: $($pkg.SdkType)"
Write-Host "Artifact Name: $($pkg.ArtifactName)"
Write-Host "Release date: $($pkg.ReleaseStatus)"
$configFilePrefix = $pkg.Name
if ($pkg.ArtifactName)
{
$configFilePrefix = $pkg.ArtifactName
}
$outputPath = Join-Path -Path $outDirectory "$configFilePrefix.json"
Write-Host "Output path of json file: $outputPath"
$outDir = Split-Path $outputPath -parent
if (-not (Test-Path -path $outDir))
{
Write-Host "Creating directory $($outDir) for json property file"
New-Item -ItemType Directory -Path $outDir
}

# If package properties for a track 2 (IsNewSdk = true) package has
# already been written, skip writing to that same path.
if ($exportedPaths.ContainsKey($outputPath) -and $exportedPaths[$outputPath].IsNewSdk -eq $true) {
Write-Host "Track 2 package info with file name $($outputPath) already exported. Skipping export."
continue
}
$exportedPaths[$outputPath] = $pkg

SetOutput $outputPath $pkg
}
$outputPath = Join-Path -Path $outDirectory "$configFilePrefix.json"
Write-Host "Output path of json file: $outputPath"
$outDir = Split-Path $outputPath -parent
if (-not (Test-Path -path $outDir))
{
Write-Host "Creating directory $($outDir) for json property file"
New-Item -ItemType Directory -Path $outDir
}

# If package properties for a track 2 (IsNewSdk = true) package has
# already been written, skip writing to that same path.
if ($exportedPaths.ContainsKey($outputPath) -and $exportedPaths[$outputPath].IsNewSdk -eq $true) {
Write-Host "Track 2 package info with file name $($outputPath) already exported. Skipping export."
continue
}
$exportedPaths[$outputPath] = $pkg

SetOutput $outputPath $pkg
}

Get-ChildItem -Path $outDirectory
Expand Down