Merge pull request #9571 from umbraco/netcore/feature/update-umbraco-version-in-template-from-azure-pipeline

Netcore: Update umbraco version in template from azure pipeline
This commit is contained in:
Bjarke Berg
2020-12-17 15:12:03 +01:00
committed by GitHub
2 changed files with 10 additions and 3 deletions

View File

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

View File

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