Conditionally update Umbraco version in templates

This commit is contained in:
Ronald Barendse
2022-02-24 11:41:31 +01:00
parent 5a3578eca9
commit ee3f7520b3

View File

@@ -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
}
}
}