Reverted changes to verify-changelog.yml and script
This commit is contained in:
parent
5f2ab2f337
commit
e10992a7d4
@ -14,9 +14,6 @@ parameters:
|
||||
- name: Condition
|
||||
type: string
|
||||
default: succeeded()
|
||||
- name: PackageInfoFilePath
|
||||
type: string
|
||||
default: ''
|
||||
|
||||
steps:
|
||||
- task: Powershell@2
|
||||
@ -26,7 +23,6 @@ steps:
|
||||
-PackageName '${{ parameters.PackageName }}'
|
||||
-ServiceDirectory '${{ coalesce(parameters.ServiceDirectory, parameters.ServiceName) }}'
|
||||
-ForRelease $${{ parameters.ForRelease }}
|
||||
-PackageInfoFilePath '${{ parameters.PackageInfoFilePath }}'
|
||||
pwsh: true
|
||||
workingDirectory: $(Pipeline.Workspace)
|
||||
displayName: Verify ChangeLogEntry for ${{ parameters.PackageName }}
|
||||
|
||||
@ -266,5 +266,3 @@ function Split-ArrayIntoBatches {
|
||||
|
||||
return , $batches
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,20 +1,11 @@
|
||||
# Wrapper Script for ChangeLog Verification
|
||||
# Parameter description
|
||||
# ChangeLogLocation: Path to the changelog file
|
||||
# VersionString: Version string to verify in the changelog
|
||||
# PackageName: Name of the package
|
||||
# ServiceDirectory: Service directory path
|
||||
# ForRelease: Whether to verify for release (default: false)
|
||||
# GroupId: Optional. The group ID for the package. Used for filtering packages in languages that support group identifiers (e.g., Java).
|
||||
|
||||
[CmdletBinding()]
|
||||
param (
|
||||
[String]$ChangeLogLocation,
|
||||
[String]$VersionString,
|
||||
[string]$PackageName,
|
||||
[string]$ServiceDirectory,
|
||||
[boolean]$ForRelease = $False,
|
||||
[String]$PackageInfoFilePath
|
||||
[boolean]$ForRelease = $False
|
||||
)
|
||||
Set-StrictMode -Version 3
|
||||
|
||||
@ -27,16 +18,7 @@ if ($ChangeLogLocation -and $VersionString)
|
||||
}
|
||||
else
|
||||
{
|
||||
# Load package info to extract GroupId if available
|
||||
$GroupId = $null
|
||||
if ($PackageInfoFilePath -and (Test-Path $PackageInfoFilePath)) {
|
||||
$packageInfoJson = Get-Content $PackageInfoFilePath | ConvertFrom-Json
|
||||
if ($packageInfoJson.PSObject.Properties.Name -contains "Group") {
|
||||
$GroupId = $packageInfoJson.Group
|
||||
}
|
||||
}
|
||||
|
||||
$PackageProp = Get-PkgProperties -PackageName $PackageName -ServiceDirectory $ServiceDirectory -GroupId $GroupId
|
||||
$PackageProp = Get-PkgProperties -PackageName $PackageName -ServiceDirectory $ServiceDirectory
|
||||
$validChangeLog = Confirm-ChangeLogEntry -ChangeLogLocation $PackageProp.ChangeLogPath -VersionString $PackageProp.Version -ForRelease $ForRelease
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user