Sync eng/common directory with azure-sdk-tools for PR 11726 (#6703)
* Update release plan completion script to take package info file * Take only info file path as param --------- Co-authored-by: Praveen Kuttappan <praveen.kuttappan@gmail.com>
This commit is contained in:
parent
d92150f6df
commit
800b05fc30
@ -1,12 +1,6 @@
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$PackageName,
|
||||
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$PackageVersion,
|
||||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[int]$MaxCount = 5
|
||||
[string]$PackageInfoFilePath
|
||||
)
|
||||
|
||||
<#
|
||||
@ -16,23 +10,31 @@ param(
|
||||
.DESCRIPTION
|
||||
This script helps to mark release plan completion by finding the active release plans for a package name
|
||||
|
||||
.PARAMETER PackageName
|
||||
The package name being released (required)
|
||||
|
||||
.PARAMETER PackageVersion
|
||||
The package version being released (required)
|
||||
|
||||
.PARAMETER MaxCount
|
||||
Maximum number of recent pull request merges to check (default: 5)
|
||||
|
||||
.PARAMETER PackageInfoFilePath
|
||||
The path to the package information file (required)
|
||||
#>
|
||||
|
||||
Set-StrictMode -Version 3
|
||||
. (Join-Path $PSScriptRoot common.ps1)
|
||||
. (Join-Path $PSScriptRoot Helpers DevOps-WorkItem-Helpers.ps1)
|
||||
|
||||
$AzureDevOpsOrganization = "azure-sdk"
|
||||
$AzureDevOpsProject = "Release"
|
||||
|
||||
#Get package properties
|
||||
if (-Not (Test-Path $PackageInfoFilePath))
|
||||
{
|
||||
Write-Host "Package information file path $($PackageInfoFilePath) is invalid."
|
||||
exit 0
|
||||
}
|
||||
# Get package info from json file created before updating version to daily dev
|
||||
$pkgInfo = Get-Content $PackageInfoFilePath | ConvertFrom-Json
|
||||
$PackageVersion = $pkgInfo.Version
|
||||
$PackageName = $pkgInfo.Name
|
||||
if (!$PackageName -or !$PackageVersion)
|
||||
{
|
||||
Write-Host "Package name or version is not available in the package information file. Skipping the release plan status update for the package."
|
||||
exit 0
|
||||
}
|
||||
|
||||
# Check Azure DevOps Release Plan work items if LanguageShort is available
|
||||
Write-Host "Checking active release plan work items for package: $PackageName"
|
||||
$workItems = Get-ReleasePlanForPackage $PackageName
|
||||
|
||||
Loading…
Reference in New Issue
Block a user