-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 new 'Umbraco Package RCL' project template #13776
Conversation
…r in Umbraco Package project template
…ameter in Umbraco project template and persist selected parameters
"Framework": { | ||
"longName": "Framework", | ||
"shortName": "F" | ||
"longName": "framework", | ||
"isHidden": true | ||
}, | ||
"UmbracoVersion": { | ||
"longName": "version", | ||
"shortName": "v" | ||
"shortName": "" | ||
}, |
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.
The only allowed framework version is net7.0
(for now), so there's no need to show this parameter.
Since this value isn't supported on older Umbraco versions, any unaltered command would result in an ...is not a valid value...
error, so I've also updated the capitalization to align with the default ASP.NET Core templates.
Similarly, .NET 7 introduced a new verbosity option, taking the v
short name, resulting in having to use -p:v
for the Umbraco version instead. To remove any confusion, only allowing --version
seems like a better idea.
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.
I just fear if the change in long name is breaking anyones buildscripts. That change should IMO only be for v12
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.
@ronaldbarendse I agree with Bjarke here, could you make a separate PR for this change targeting v12? I know we already bumped this to v11, so lets get it done now, so we don't keep pushing this change back 😁
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.
I've reverted the changes to the Framework
and UmbracoVersion
parameter names, so this isn't breaking anymore. The Framework
parameter will now be hidden though, since only net7.0
is a valid value: we can show it again when net8.0
gets added and there's an actual choice to make 😉
The new umbracopackage-rcl
template won't have the v
short name, since we know it already clashes with the verbosity option and will be removed in v12 anyway...
Looks good, tests good 🚀 |
This is basically identical to PR #13460 that was automatically closed when 11.0 was released and the
release/11.0
branch got deleted.Prerequisites
Description
With PR #13141 merged, packages targeting v11 can now be distributed as a Razor Class Library, removing the need for custom MSBuild targets that copy files into the Umbraco project and simplifying the reference between the package and test site project.
This PR adds a new 'Umbraco Package RCL' (
dotnet new umbracopackage-rcl
) project template that is basically the same as the default 'Razor Class Library' template, but includes references to the CMS and a samplepackage.manifest
file. Developers can still choose to use the existing 'Umbraco Package' (dotnet new umbracopackage
) template, e.g. if they want to support an older Umbraco version.To test, pack and install the templates from this PR using:
Then go to a new empty folder and create a new package including a test site using:
Now inspect and ensure the following:
Our.Umbraco.MyPackage.1.0.0.nupkg
contains the default RCL build props and thestaticwebsassets
folder contains thepackage.manifest
file;publish\wwwroot\App_Plugins\Our.Umbraco.MyPackage\package.manifest
exists);You can also do a sanity check and test whether adding tours, icons, dashboards, language files, etc. to the package works, but that is already done as part of the linked PR.