Skip to content

Commit 3c21c59

Browse files
Sync eng/common directory with azure-sdk-tools for PR 1729 (Azure#15927)
* 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>
1 parent cbaa410 commit 3c21c59

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

eng/common/scripts/Create-APIReview.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ if ($packages)
121121
# Ignore API review status for prerelease version
122122
Write-Host "Package version is not GA. Ignoring API view approval status"
123123
}
124+
elseif (!$pkgInfo.ReleaseStatus -or $pkgInfo.ReleaseStatus -eq "Unreleased")
125+
{
126+
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."
127+
}
124128
else
125129
{
126130
# Return error code if status code is 201 for new data plane package

eng/common/scripts/Package-Properties.ps1

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class PackageProps
1313
[string]$SdkType
1414
[boolean]$IsNewSdk
1515
[string]$ArtifactName
16+
[string]$ReleaseStatus
1617

1718
PackageProps([string]$name, [string]$version, [string]$directoryPath, [string]$serviceDirectory)
1819
{
@@ -48,6 +49,12 @@ class PackageProps
4849
if (Test-Path (Join-Path $directoryPath "CHANGELOG.md"))
4950
{
5051
$this.ChangeLogPath = Join-Path $directoryPath "CHANGELOG.md"
52+
# Get release date for current version and set in package property
53+
$changeLogEntry = Get-ChangeLogEntry -ChangeLogLocation $this.ChangeLogPath -VersionString $this.Version
54+
if ($changeLogEntry -and !$changeLogEntry.ReleaseStatus)
55+
{
56+
$this.ReleaseStatus = $changeLogEntry.ReleaseStatus.Trim().Trim("()")
57+
}
5158
}
5259
else
5360
{

eng/common/scripts/Save-Package-Properties.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ if ($allPackageProperties)
2222
Write-Host "Package Version: $($pkg.Version)"
2323
Write-Host "Package SDK Type: $($pkg.SdkType)"
2424
Write-Host "Artifact Name: $($pkg.ArtifactName)"
25+
Write-Host "Release date: $($pkg.ReleaseStatus)"
2526
$configFilePrefix = $pkg.Name
2627
if ($pkg.ArtifactName)
2728
{

0 commit comments

Comments
 (0)