From cd169fbcce5a28673bce41df5dddbff3bd6ec61a Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Thu, 17 Dec 2020 14:26:17 +0100 Subject: [PATCH] Update version number in umbraco template from azure pipeline in continuous builds --- build/azure-pipelines.yml | 9 ++++++++- .../UmbracoSolution/.template.config/template.json | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index c545d6884e..92c2cb13ed 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -18,7 +18,7 @@ resources: ACCEPT_EULA: Y SA_PASSWORD: $(SA_PASSWORD) MSSQL_PID: Developer - ports: + ports: - 1433:1433 options: --name mssql @@ -170,6 +170,13 @@ stages: $continuous = "$($version.Release)-alpha.$(Build.BuildNumber)" } $ubuild.SetUmbracoVersion($continuous) + + #Update the version in template 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 + Write-Host "Building: $continuous" - task: PowerShell@1 diff --git a/build/templates/UmbracoSolution/.template.config/template.json b/build/templates/UmbracoSolution/.template.config/template.json index 26d2358639..6dc582ca26 100644 --- a/build/templates/UmbracoSolution/.template.config/template.json +++ b/build/templates/UmbracoSolution/.template.config/template.json @@ -9,13 +9,13 @@ "language": "C#", "type": "project" }, - "sourceName": "UmbracoSolution", // Will be replaced with the value provided via -n + "sourceName": "UmbracoSolution", "preferNameDirectory": true, "symbols": { "version": { "type": "parameter", "datatype": "string", - "defaultValue": "0.5.0-alpha*", + "defaultValue": "0.5.0-alpha003", "description": "The version of Umbraco to load using NuGet", "replaces": "UMBRACO_VERSION_FROM_TEMPLATE" },