Skip to content

Commit

Permalink
Sync eng/common directory with azure-sdk-tools for PR 1729 (#14887)
Browse files Browse the repository at this point in the history
* Check for API review status only if release date is set in changelog

* Change property name to ReleaseStatus

Co-authored-by: Praveen Kuttappan <praveen.kuttappan@gmail.com>
  • Loading branch information
azure-sdk and praveenkuttappan authored Jun 24, 2021
1 parent 84a464e commit 9489d00
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions eng/common/scripts/Create-APIReview.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ if ($packages)
# Ignore API review status for prerelease version
Write-Host "Package version is not GA. Ignoring API view approval status"
}
elseif (!$pkgInfo.ReleaseStatus -or $pkgInfo.ReleaseStatus -eq "Unreleased")
{
Write-Host "Release date is not set for current version in change log file for package. Ignoring API review approval status since package is not yet ready for release."
}
else
{
# Return error code if status code is 201 for new data plane package
Expand Down
7 changes: 7 additions & 0 deletions eng/common/scripts/Package-Properties.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class PackageProps
[string]$SdkType
[boolean]$IsNewSdk
[string]$ArtifactName
[string]$ReleaseStatus

PackageProps([string]$name, [string]$version, [string]$directoryPath, [string]$serviceDirectory)
{
Expand Down Expand Up @@ -48,6 +49,12 @@ class PackageProps
if (Test-Path (Join-Path $directoryPath "CHANGELOG.md"))
{
$this.ChangeLogPath = Join-Path $directoryPath "CHANGELOG.md"
# Get release date for current version and set in package property
$changeLogEntry = Get-ChangeLogEntry -ChangeLogLocation $this.ChangeLogPath -VersionString $this.Version
if ($changeLogEntry -and !$changeLogEntry.ReleaseStatus)
{
$this.ReleaseStatus = $changeLogEntry.ReleaseStatus.Trim().Trim("()")
}
}
else
{
Expand Down
1 change: 1 addition & 0 deletions eng/common/scripts/Save-Package-Properties.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ if ($allPackageProperties)
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)
{
Expand Down

0 comments on commit 9489d00

Please sign in to comment.