Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update default UmbracoVersion template value using MSBuild target #13481

Merged
merged 7 commits into from
Apr 5, 2023

Conversation

ronaldbarendse
Copy link
Contributor

@ronaldbarendse ronaldbarendse commented Nov 25, 2022

Prerequisites

  • I have added steps to test this contribution in the description below

Description

Local package builds of the Umbraco.Templates project didn't produce the same output as the Azure Pipelines build, because the the default UmbracoVersion template value was only updated in the build scipt.

This made testing local builds of the templates harder, as you need to explicitly specify the (preview) version when creating a new project, as you can see in PR #13460.

This PR moves the custom build script to an MSBuild JsonPathUpdateValue task (provided by the Umbraco.JsonSchema.Extensions package) to transform/merge all the template.json files to contain the same package version as is being built.

Testing should be done with both a local (dotnet pack --configuration Release --output build.out) and CI build (downloading the nupkg artifacts) by:

  • Validating whether all template.json files in Umbraco.Templates.*.nupkg have the correct version in symbols.UmbracoVersion.defaultValue;
  • You can install the template: dotnet new install build.out\Umbraco.Templates.*.nupkg;
  • Creating a new project from this template sets the same package reference version for Umbraco.Cms as the template: dotnet new umbraco (you might need to add a NuGet config file pointing to the locally built packages: dotnet new nugetconfig and dotnet nuget add source ./build.out --name Local).

@Zeegaan Zeegaan merged commit 4cb46f0 into v11/dev Apr 5, 2023
@Zeegaan Zeegaan deleted the v11/feature/templatejson-umbracoversion branch April 5, 2023 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants