1
1
param (
2
2
[Parameter (Mandatory = $true )]
3
- [string ]$PackageName ,
4
-
5
- [Parameter (Mandatory = $true )]
6
- [string ]$PackageVersion ,
7
-
8
- [Parameter (Mandatory = $false )]
9
- [int ]$MaxCount = 5
3
+ [string ]$PackageInfoFilePath
10
4
)
11
5
12
6
<#
@@ -16,23 +10,31 @@ param(
16
10
. DESCRIPTION
17
11
This script helps to mark release plan completion by finding the active release plans for a package name
18
12
19
- . PARAMETER PackageName
20
- The package name being released (required)
21
-
22
- . PARAMETER PackageVersion
23
- The package version being released (required)
24
-
25
- . PARAMETER MaxCount
26
- Maximum number of recent pull request merges to check (default: 5)
27
-
13
+ . PARAMETER PackageInfoFilePath
14
+ The path to the package information file (required)
28
15
#>
29
16
30
17
Set-StrictMode - Version 3
31
18
. (Join-Path $PSScriptRoot common.ps1)
32
19
. (Join-Path $PSScriptRoot Helpers DevOps- WorkItem- Helpers.ps1)
33
20
34
- $AzureDevOpsOrganization = " azure-sdk"
35
- $AzureDevOpsProject = " Release"
21
+
22
+ # Get package properties
23
+ if (-Not (Test-Path $PackageInfoFilePath ))
24
+ {
25
+ Write-Host " Package information file path $ ( $PackageInfoFilePath ) is invalid."
26
+ exit 0
27
+ }
28
+ # Get package info from json file created before updating version to daily dev
29
+ $pkgInfo = Get-Content $PackageInfoFilePath | ConvertFrom-Json
30
+ $PackageVersion = $pkgInfo.Version
31
+ $PackageName = $pkgInfo.Name
32
+ if (! $PackageName -or ! $PackageVersion )
33
+ {
34
+ Write-Host " Package name or version is not available in the package information file. Skipping the release plan status update for the package."
35
+ exit 0
36
+ }
37
+
36
38
# Check Azure DevOps Release Plan work items if LanguageShort is available
37
39
Write-Host " Checking active release plan work items for package: $PackageName "
38
40
$workItems = Get-ReleasePlanForPackage $PackageName
0 commit comments