diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index aaebb831b..4074f692b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,10 +32,11 @@ jobs: $version = "${{steps.gitversion.outputs.majorMinorPatch}}.$date" $major = "${{steps.gitversion.outputs.major}}" $minor = "${{steps.gitversion.outputs.minor}}" + $patch = "${{steps.gitversion.outputs.patch}}" . .\dist\azure\update-version.ps1 update-manifest .\dist\azure\vss-extension.json -Version $version - dir -r .\dist\**\task.json | % { update-task $_ -Major $major -Minor $minor } + dir -r .\dist\**\task.json | % { update-task $_ -Major $major -Minor $minor -Patch $patch } npm run publish:azure -- --token ${{ secrets.TFX_TOKEN }} shell: pwsh diff --git a/dist/azure/update-version.ps1 b/dist/azure/update-version.ps1 index 8cc79007d..38affa82d 100644 --- a/dist/azure/update-version.ps1 +++ b/dist/azure/update-version.ps1 @@ -10,14 +10,19 @@ function update-task() { [Parameter(Mandatory=$True, Position=2, ValueFromPipeline=$false)] [System.String] - $minor + $minor, + + [Parameter(Mandatory=$True, Position=3, ValueFromPipeline=$false)] + [System.String] + $patch ) $file = Resolve-Path $file $jqMajor = '.version.Major=\"' + $major +'\"'; $jqMinor = '.version.Minor=\"' + $minor +'\"'; - Write-Host "Update task from $file to version $major.$minor" + $jqPatch = '.version.Patch=\"' + $patch +'\"'; + Write-Host "Update task from $file to version $major.$minor.$patch" - Get-Content $file | jq $jqMajor | jq $jqMinor | Set-Content $file + Get-Content $file | jq $jqMajor | jq $jqMinor| jq $jqPatch | Set-Content $file } function update-manifest() {