mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-14 05:34:48 +00:00
Pass dotnet publsh /p: arguments to the publish command
use '/p:propertyName=value' or '/property:propertyName=value' to pass in dotnet build property overrides. fixes #523 https://github.com/ElectronNET/Electron.NET/issues/523
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace ElectronNET.CLI
|
||||
{
|
||||
@@ -29,10 +31,24 @@ namespace ElectronNET.CLI
|
||||
}
|
||||
if (currentName != "")
|
||||
Arguments[currentName] = values.ToArray();
|
||||
|
||||
Console.ForegroundColor = ConsoleColor.Green;
|
||||
Console.WriteLine($"Arguments: \n\t{string.Join("\n\t",Arguments.Keys.Select(i => $"{i} = {string.Join(" ", Arguments[i])}"))}");
|
||||
Console.ResetColor();
|
||||
}
|
||||
public bool Contains(string name)
|
||||
{
|
||||
return Arguments.ContainsKey(name);
|
||||
}
|
||||
|
||||
internal bool TryGet(string key, out string[] value)
|
||||
{
|
||||
value = null;
|
||||
if (!Contains(key)) {
|
||||
return false;
|
||||
}
|
||||
value = Arguments[key];
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user