diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 36dada748c..60c7a70e47 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -124,39 +124,49 @@ stages: inputs: scriptType: inlineScript inlineScript: > - Write-Host "Working folder: $pwd" + Write-Host "Working folder: $pwd" - $ubuild = build/build.ps1 -get -continue + $ubuild = build/build.ps1 -get -continue - $version = $ubuild.GetUmbracoVersion() + $version = $ubuild.GetUmbracoVersion() - if ($version.Comment -ne "") - { - # 8.0.0-beta.33.1234 - $continuous = "$($version.Semver).$(Build.BuildNumber)" - } - else - { - # 8.0.0-alpha.1234 - $continuous = "$($version.Release)-alpha.$(Build.BuildNumber)" - } - $ubuild.SetUmbracoVersion($continuous) + if ($version.Comment -ne "") + { + # 8.0.0-beta.33.1234 + $continuous = "$($version.Semver).$(Build.BuildNumber)" + } + else + { + # 8.0.0-alpha.1234 + $continuous = "$($version.Release)-alpha.$(Build.BuildNumber)" + } + $ubuild.SetUmbracoVersion($continuous) - #Update the version in templates also + #Update the version in templates also - $templatePath ='build/templates/UmbracoSolution/.template.config/template.json' - $a = Get-Content $templatePath -raw | ConvertFrom-Json - $a.symbols.version.defaultValue = $continuous - $a | ConvertTo-Json -depth 32| set-content $templatePath + $templatePath = + 'build/templates/UmbracoSolution/.template.config/template.json' - $template2Path = 'build/templates/UmbracoPackage/.template.config/template.json' - $b = Get-Content $template2Path -raw | ConvertFrom-Json - $b.symbols.version.defaultValue = $continuous - $b | ConvertTo-Json -depth 32| set-content $template2Path + $a = Get-Content $templatePath -raw | ConvertFrom-Json - Write-Host "Building: $continuous" + $a.symbols.version.defaultValue = $continuous + + $a | ConvertTo-Json -depth 32| set-content $templatePath + + + $templatePath = + 'build/templates/UmbracoPackage/.template.config/template.json' + + $a = Get-Content $templatePath -raw | ConvertFrom-Json + + $a.symbols.version.defaultValue = $continuous + + $a | ConvertTo-Json -depth 32| set-content $templatePath + + + Write-Host "Building: $continuous" - task: PowerShell@1 displayName: Prepare Build inputs: