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

OSOE-764: Making the deprecated Init-OrchardCoreSolution and Initialize-OrchardCore commands work with aliases for backwards compatibility #43

Merged
merged 7 commits into from
Jan 12, 2024
35 changes: 0 additions & 35 deletions OrchardCore/Initialize-OrchardCore/Initialize-OrchardCore.psm1

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@{
RootModule = './Initialize-OrchardCoreSolution.psm1'
ModuleVersion = '0.0.1'
GUID = 'f307f677-bba7-409f-88dd-c17531e21731'
Author = 'Lombiq Technologies Ltd. (https://lombiq.com)'
CompanyName = 'Lombiq Technologies Ltd.'
VariablesToExport = '*'
AliasesToExport = @('Init-OrchardCoreSolution', 'Initialize-OrchardCore')
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
function Initialize-OrchardCoreSolution
{
[CmdletBinding()]
[alias('Init-OrchardCoreSolution')]
[alias('Init-OrchardCoreSolution', 'Initialize-OrchardCore')]
Param
(
[string] $Path = (Get-Location).Path,
Expand All @@ -28,6 +28,11 @@ function Initialize-OrchardCoreSolution

Process
{
if ($MyInvocation.InvocationName -ne 'Initialize-OrchardCoreSolution')
{
Write-Warning 'You''re using the deprecated name of this module. Use "Initialize-OrchardCoreSolution" instead.'
}

if ([string]::IsNullOrEmpty($NuGetSource))
{
dotnet new install OrchardCore.ProjectTemplates::1.7.0
Expand Down