Package-Script-Writer
Package-Script-Writer copied to clipboard
Enhancement? : Don't reinstall existing Umbraco Template (check the installed version matches the (forced) version)
Thinking something like this?
# Ensure we have the version specific Umbraco templates
$templateList = dotnet new uninstall | Out-String
$packageVersion = $templateList | Select-String '(?s)Umbraco.Templates.*Version: (.*?)\r\n'| Select-Object -expand Matches | Select-Object -expand Groups | Select-Object -ExpandProperty Value -Skip 1 -First 1
if ($packageVersion -ne $version)
{
dotnet new install Umbraco.Templates::$version --force
}