* Fixes stale task versioning #589 * Fix typo
This commit is contained in:
Родитель
17dce0ee1d
Коммит
d6334b4a25
|
@ -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";
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче