diff --git a/ElectronNET.CLI/Commands/BuildCommand.cs b/ElectronNET.CLI/Commands/BuildCommand.cs index d9c07465..ae09b1e2 100644 --- a/ElectronNET.CLI/Commands/BuildCommand.cs +++ b/ElectronNET.CLI/Commands/BuildCommand.cs @@ -23,7 +23,8 @@ public class BuildCommand : ICommand "Optional: '/install-modules' to force node module install. Implied by '/package-json'" + Environment.NewLine + "Optional: '/Version' to specify the version that should be applied to both the `dotnet publish` and `electron-builder` commands. Implied by '/Version'" + Environment.NewLine + "Optional: '/p:[property]' or '/property:[property]' to pass in dotnet publish properties. Example: '/property:Version=1.0.0' to override the FileVersion" + Environment.NewLine + - "Full example for a 32bit debug build with electron prune: build /target custom win7-x86;win32 /dotnet-configuration Debug /electron-arch ia32 /electron-params \"--prune=true \""; + "Full example for a 32bit debug build with electron prune: build /target custom win7-x86;win32 /dotnet-configuration Debug /electron-arch ia32 /electron-params \"--prune=true \"" + Environment.NewLine + + "Full example to pass publish parameters: build /PublishReadyToRun false /PublishSingleFile false /target custom win7-x86;win32 /dotnet-configuration Debug /electron-arch ia32 /electron-params \"--prune=true \""; public static IList CommandOptions { get; set; } = new List(); @@ -61,7 +62,7 @@ public Task ExecuteAsync() if (parser.Arguments.ContainsKey(_paramVersion)) version = parser.Arguments[_paramVersion][0]; - if (!parser.Arguments.ContainsKey(_paramTarget)) + if (!parser.Arguments.ContainsKey(_paramTarget) || parser.Arguments[_paramTarget].Length == 0) { Console.WriteLine($"Error: missing '{_paramTarget}' argument."); Console.WriteLine(COMMAND_ARGUMENTS); @@ -211,7 +212,7 @@ private Dictionary GetDotNetPublishFlags(SimpleCommandLineParser var dotNetPublishFlags = new Dictionary { {"/p:PublishReadyToRun", parser.TryGet(_paramPublishReadyToRun, out var rtr) ? rtr[0] : "true"}, - {"/p:PublishSingleFile", parser.TryGet(_paramPublishSingleFile, out var psf) ? psf[0] : "true"}, + {"/p:PublishSingleFile", parser.TryGet(_paramPublishSingleFile, out var psf) ? psf[0] : "false"}, }; if (parser.Arguments.ContainsKey(_paramVersion)) @@ -252,4 +253,4 @@ private Dictionary GetDotNetPublishFlags(SimpleCommandLineParser return dotNetPublishFlags; } } -} \ No newline at end of file +} diff --git a/README.md b/README.md index e6e1533a..36b9978e 100644 --- a/README.md +++ b/README.md @@ -188,9 +188,9 @@ MIT-licensed ## 📝 Important notes -### ElectronNET.API & ElectronNET.CLI Version 9.31.2 +### ElectronNET.API & ElectronNET.CLI Version 13.5.1 -Make sure you also have the new Electron.NET API & CLI 9.31.2 version. +Make sure you also have the new Electron.NET API & CLI 13.5.1 version. ``` dotnet tool update ElectronNET.CLI -g