Skip to content

Commit 84fa5c6

Browse files
authored
Sync eng/common directory with azure-sdk-tools repository (Azure#13248)
1 parent b80d54a commit 84fa5c6

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

eng/common/scripts/Verify-ChangeLog.ps1

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ param (
1111
[boolean]$ForRelease=$False
1212
)
1313

14+
$ProgressPreference = "SilentlyContinue"
1415
. (Join-Path $PSScriptRoot SemVer.ps1)
1516
Import-Module (Join-Path $PSScriptRoot modules ChangeLog-Operations.psm1)
1617

eng/common/scripts/modules/ChangeLog-Operations.psm1

+2-3
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,8 @@ function Confirm-ChangeLogEntry {
9494
}
9595

9696
if ($ForRelease -eq $True) {
97-
$CurrentDate = Get-Date -Format "yyyy-MM-dd"
98-
if ($changeLogEntry.ReleaseStatus -ne "($CurrentDate)") {
99-
Write-Host ("##[warning]Incorrect Date: Please use the current date in the Changelog '{0}' before releasing the package" -f $ChangeLogLocation)
97+
if ($changeLogEntry.ReleaseStatus -eq "(Unreleased)") {
98+
Write-Host ("##[error]No release date set. Please set a release date with format 'yyyy-MM-dd' in the heading for version '{0}' in the changelog '{1}'." -f $VersionString, $ChangelogLocation)
10099
exit 1
101100
}
102101

eng/common/scripts/modules/Package-Properties.psm1

+9-2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class PackageProps
4545
}
4646
}
4747

48+
$ProgressPreference = "SilentlyContinue"
4849
Install-Module -Name powershell-yaml -RequiredVersion 0.4.1 -Force -Scope CurrentUser
4950

5051
function Extract-PkgProps ($pkgPath, $serviceName, $pkgName, $lang)
@@ -239,8 +240,14 @@ function Get-PkgListFromYml ($ciYmlPath)
239240
{
240241
$ciYmlContent = Get-Content $ciYmlPath -Raw
241242
$ciYmlObj = ConvertFrom-Yaml $ciYmlContent -Ordered
242-
$artifactsInCI = $ciYmlObj["stages"][0]["parameters"]["Artifacts"]
243-
243+
if ($ciYmlObj.Contains("stages"))
244+
{
245+
$artifactsInCI = $ciYmlObj["stages"][0]["parameters"]["Artifacts"]
246+
}
247+
elseif ($ciYmlObj.Contains("extends"))
248+
{
249+
$artifactsInCI = $ciYmlObj["extends"]["parameters"]["Artifacts"]
250+
}
244251
if ($artifactsInCI -eq $null)
245252
{
246253
Write-Error "Failed to retrive package names in ci $ciYmlPath"

0 commit comments

Comments
 (0)