From ee3f7520b33d92f1ee2cc68b8d29eec76d0d072f Mon Sep 17 00:00:00 2001 From: Ronald Barendse Date: Thu, 24 Feb 2022 11:41:31 +0100 Subject: [PATCH] Conditionally update Umbraco version in templates --- build/azure-pipelines.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 2f07d879d2..2dd5626d9a 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -411,8 +411,10 @@ stages: $templatePaths = Get-ChildItem 'templates/**/.template.config/template.json' foreach ($templatePath in $templatePaths) { $a = Get-Content $templatePath -Raw | ConvertFrom-Json - $a.symbols.UmbracoVersion.defaultValue = $continuous - $a | ConvertTo-Json -Depth 32 | Set-Content $templatePath + if ($a.symbols -and $a.symbols.UmbracoVersion) { + $a.symbols.UmbracoVersion.defaultValue = $continuous + $a | ConvertTo-Json -Depth 32 | Set-Content $templatePath + } } }