Skip to content
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
38 changes: 20 additions & 18 deletions eng/common/scripts/Mark-ReleasePlanCompletion.ps1
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
param(
[Parameter(Mandatory = $true)]
[string]$PackageName,

[Parameter(Mandatory = $true)]
[string]$PackageVersion,

[Parameter(Mandatory = $false)]
[int]$MaxCount = 5
[string]$PackageInfoFilePath
)

<#
Expand All @@ -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
Expand Down