Skip to content

Commit 1862094

Browse files
Merge pull request #585 from tub5/bug/584
If we provide the Version parameter and haven't included the version …
2 parents 0ad89c7 + 0af664b commit 1862094

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ElectronNET.CLI/Commands/BuildCommand.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,14 @@ private Dictionary<string, string> GetDotNetPublishFlags(SimpleCommandLineParser
214214
{"/p:PublishSingleFile", parser.TryGet(_paramPublishSingleFile, out var psf) ? psf[0] : "true"},
215215
};
216216

217+
if (parser.Arguments.ContainsKey(_paramVersion))
218+
{
219+
if(parser.Arguments.Keys.All(key => !key.StartsWith("p:Version=") && !key.StartsWith("property:Version=")))
220+
dotNetPublishFlags.Add("/p:Version", parser.Arguments[_paramVersion][0]);
221+
if(parser.Arguments.Keys.All(key => !key.StartsWith("p:ProductVersion=") && !key.StartsWith("property:ProductVersion=")))
222+
dotNetPublishFlags.Add("/p:ProductVersion", parser.Arguments[_paramVersion][0]);
223+
}
224+
217225
foreach (var parm in parser.Arguments.Keys.Where(key => key.StartsWith("p:") || key.StartsWith("property:")))
218226
{
219227
var split = parm.IndexOf('=');

0 commit comments

Comments
 (0)