fix jq version replacement

This commit is contained in:
Artur Stolear
2024-02-07 13:34:07 +01:00
parent 2c1dea98d9
commit 2f9911e27e

View File

@@ -17,9 +17,9 @@ function update-task() {
$patch $patch
) )
$file = Resolve-Path $file $file = Resolve-Path $file
$jqMajor = '.version.Major=\"' + $major +'\"'; $jqMajor = '.version.Major="' + $major +'"';
$jqMinor = '.version.Minor=\"' + $minor +'\"'; $jqMinor = '.version.Minor="' + $minor +'"';
$jqPatch = '.version.Patch=\"' + $patch +'\"'; $jqPatch = '.version.Patch="' + $patch +'"';
Write-Host "Update task from $file to version $major.$minor.$patch" Write-Host "Update task from $file to version $major.$minor.$patch"
Get-Content $file | jq $jqMajor | jq $jqMinor| jq $jqPatch | Set-Content $file Get-Content $file | jq $jqMajor | jq $jqMinor| jq $jqPatch | Set-Content $file
@@ -36,7 +36,7 @@ function update-manifest() {
$version $version
) )
$file = Resolve-Path $file $file = Resolve-Path $file
$jqVersion = '.version=\"' + $version +'\"'; $jqVersion = '.version="' + $version +'"';
Write-Host "Update manifest version to $version" Write-Host "Update manifest version to $version"
Get-Content $file | jq $jqVersion | Set-Content $file Get-Content $file | jq $jqVersion | Set-Content $file