Skip to content

Commit

Permalink
Migrations Bundles: Address API Review feedback
Browse files Browse the repository at this point in the history
Part of #24743
  • Loading branch information
bricelam committed Aug 19, 2021
1 parent 29f9e96 commit 30abd9b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/EFCore.Tools/tools/EntityFrameworkCore.PS2.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function Add-Migration(
.PARAMETER SelfContained
Also bundle the .NET runtime so it doesn't need to be installed on the machine.
.PARAMETER Runtime
.PARAMETER TargetRuntime
The target runtime to bundle for.
.PARAMETER Configuration
Expand Down Expand Up @@ -95,7 +95,7 @@ function Bundle-Migration(
$Output,
[switch] $Force,
[switch] $SelfContained,
$Runtime,
$TargetRuntime,
$Configuration,
$Framework,
$Context,
Expand Down
10 changes: 5 additions & 5 deletions src/EFCore.Tools/tools/EntityFrameworkCore.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Register-TabExpansion Bundle-Migration @{
.PARAMETER SelfContained
Also bundle the .NET runtime so it doesn't need to be installed on the machine.
.PARAMETER Runtime
.PARAMETER TargetRuntime
The target runtime to bundle for.
.PARAMETER Configuration
Expand Down Expand Up @@ -152,7 +152,7 @@ function Bundle-Migration
[string] $Output,
[switch] $Force,
[switch] $SelfContained,
[string] $Runtime,
[string] $TargetRuntime,
[string] $Configuration,
[string] $Framework,
[string] $Context,
Expand Down Expand Up @@ -185,14 +185,14 @@ function Bundle-Migration
$params += '--self-contained'
}

if ($Runtime)
if ($TargetRuntime)
{
$params += '--bundle-runtime', $Runtime
$params += '--target-runtime', $TargetRuntime
}

if ($Configuration)
{
$params += '--bundle-configuration', $Configuration
$params += '--target-configuration', $Configuration
}

$params += GetParams $Context
Expand Down
4 changes: 2 additions & 2 deletions src/ef/Commands/MigrationsBundleCommand.Configure.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public override void Configure(CommandLineApplication command)
_output = command.Option("-o|--output <FILE>", Resources.MigrationsBundleOutputDescription);
_force = command.Option("-f|--force", Resources.DbContextScaffoldForceDescription);
_selfContained = command.Option("--self-contained", Resources.SelfContainedDescription);
_runtime = command.Option("-r|--bundle-runtime <RUNTIME_IDENTIFIER>", Resources.MigrationsBundleRuntimeDescription);
_configuration = command.Option("--bundle-configuration <CONFIGURATION>", Resources.MigrationsBundleConfigurationDescription);
_runtime = command.Option("-r|--target-runtime <RUNTIME_IDENTIFIER>", Resources.MigrationsBundleRuntimeDescription);
_configuration = command.Option("--target-configuration <CONFIGURATION>", Resources.MigrationsBundleConfigurationDescription);

base.Configure(command);
}
Expand Down
2 changes: 1 addition & 1 deletion src/ef/Commands/MigrationsBundleCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ protected override int Execute(string[] args)

var outputPath = _output!.HasValue()
? _output!.Value()!
: "bundle" + exe;
: "efbundle" + exe;
var bundleName = Path.GetFileNameWithoutExtension(outputPath);

File.WriteAllText(
Expand Down

0 comments on commit 30abd9b

Please sign in to comment.