-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Add VersionAssemblyName
to package manifest
#14046
Add VersionAssemblyName
to package manifest
#14046
Conversation
src/Umbraco.Infrastructure/Services/Implement/PackagingService.cs
Outdated
Show resolved
Hide resolved
I've ensured the listed installed packages that only have a package migration plan will now use the version from the assembly they're defined in. So adding the following class into the example project (created above): using Umbraco.Cms.Core.Packaging;
public class UmbracoPackage2MigrationPlan : PackageMigrationPlan
{
public UmbracoPackage2MigrationPlan()
: base("Umbraco.Community.UmbracoPackage2")
{
}
protected override void DefinePlan()
{
}
} Will result in listing |
VersionAssemblyName
to package manifest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but we need to add the default to the RCL template too
I've merged the changes that added the new Umbraco Package RCL template, updated that package manifest as well and updated the base branch to target the v12 release 👍🏻 |
Great @ronaldbarendse |
Prerequisites
Description
Currently the version in the
package.manifest
needs to be manually set (and kept up to date!) if you want to have it shown on the installed packages overview in the back-office and included in the telemetry data.In most cases the
package.manifest
is shipped alongside an assembly (DLL), which is already versioned and with the changes in this PR, you can leave theversion
empty (or remove it from the JSON) and setversionAssemblyName
to your package assembly name to have it automatically populated with the assembly version.This ensures more packages will report the (correct) version and makes it easier for package authors (one less step/thing not to forget). The default
dotnet new umbracopackage
template will also automatically set this new property. I've also fixed an issue where the installed package overview didn't show the package version if a package migration state is already present in the database.To test: build/pack Umbraco from the repository root, install the newly created package template, create/pack a new Umbraco package project and add that to the Umbraco.Web.UI project using:
Next up, build the Umbraco.Web.UI project and start the application. You'll see the version is populated (instead of Unknown):
After testing, you can clean up using: