* Fixes stale task versioning #589

* Fix typo
This commit is contained in:
Bernie White 2022-10-27 00:42:23 +10:00 коммит произвёл GitHub
Родитель 17dce0ee1d
Коммит d6334b4a25
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 10 добавлений и 22 удалений

Просмотреть файл

@ -131,22 +131,3 @@ stages:
extensionTag: ''
extensionName: 'PSRule'
extensionVisibility: 'public'
- job: GitHub
dependsOn: stable_release
pool:
vmImage: $(imageName)
steps:
# Update GitHub release
- task: GitHubRelease@1
displayName: 'GitHub release'
inputs:
gitHubConnection: 'AzureDevOps-PSRule-pipelines'
repositoryName: '$(Build.Repository.Name)'
action: edit
tag: '$(Build.SourceBranchName)'
releaseNotesSource: inline
releaseNotesInline: 'See [change log](https://github.com/microsoft/PSRule-pipelines/blob/main/CHANGELOG.md)'
assetUploadMode: replace
addChangeLog: false
isPreRelease: false

Просмотреть файл

@ -18,6 +18,9 @@ What's changed since v2.5.1:
- Bump PSRule to v2.5.3.
[#581](https://github.com/microsoft/PSRule-pipelines/pull/581)
- See the [change log](https://microsoft.github.io/PSRule/v2/CHANGELOG-v2/#v253)
- Bug fixes:
- Fixed stale task versioning by @BernieWhite.
[#589](https://github.com/microsoft/PSRule-pipelines/issues/589)
## v2.5.1

Просмотреть файл

@ -83,11 +83,15 @@ function UpdateTaskVersion {
[String]$Path
)
process {
$v = $version.Split('.', [System.StringSplitOptions]::RemoveEmptyEntries);
$v = $Build.Split('.', [System.StringSplitOptions]::RemoveEmptyEntries);
Get-ChildItem -Path $Path -Filter task.json -Recurse | ForEach-Object {
$filePath = $_.FullName;
$taskContent = Get-Content -Raw -Path $filePath | ConvertFrom-Json;
$taskContent.version.patch = $v[2];
if ($filePath -like '*V2*') {
$taskContent.version.Minor = $v[1];
}
$taskContent.version.Patch = $v[2];
$taskContent | ConvertTo-Json -Depth 100 | Set-Content -Path $filePath -Force;
}
}

Просмотреть файл

@ -272,7 +272,7 @@ Write-Host "[info] Using Conventions: $Conventions";
Write-Host "[info] Using InputType: $InputType";
Write-Host "[info] Using InputPath: $InputPath";
Write-Host "[info] Using Option: $Option";
Write-Host "[info] Using Option: $Outcome";
Write-Host "[info] Using Outcome: $Outcome";
Write-Host "[info] Using OutputFormat: $OutputFormat";
Write-Host "[info] Using OutputPath: $OutputPath";