Skip to content

Commit 8c250ae

Browse files
Add ConfigurationProfile paramter to electronize start command
1 parent a5543bf commit 8c250ae

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

ElectronNET.CLI/Commands/StartElectronCommand.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public StartElectronCommand(string[] args)
2727
private string _manifest = "manifest";
2828
private string _clearCache = "clear-cache";
2929
private string _paramPublishReadyToRun = "PublishReadyToRun";
30+
private string _paramDotNetConfig = "dotnet-configuration";
3031

3132
public Task<bool> ExecuteAsync()
3233
{
@@ -73,9 +74,15 @@ public Task<bool> ExecuteAsync()
7374
publishReadyToRun += "true";
7475
}
7576

77+
string configuration = "Release";
78+
if (parser.Arguments.ContainsKey(_paramDotNetConfig))
79+
{
80+
configuration = parser.Arguments[_paramDotNetConfig][0];
81+
}
82+
7683
if (parser != null && !parser.Arguments.ContainsKey("watch"))
7784
{
78-
resultCode = ProcessHelper.CmdExecute($"dotnet publish -r {platformInfo.NetCorePublishRid} --output \"{tempBinPath}\" {publishReadyToRun} --no-self-contained", aspCoreProjectPath);
85+
resultCode = ProcessHelper.CmdExecute($"dotnet publish -r {platformInfo.NetCorePublishRid} -c {configuration} --output \"{tempBinPath}\" {publishReadyToRun} --no-self-contained", aspCoreProjectPath);
7986
}
8087

8188
if (resultCode != 0)

0 commit comments

Comments
 (0)