Fix "-v"/"--verbosity" option.

release-1.0.0 v1.0.0
Icedream 2015-01-12 18:32:00 +01:00
parent 37b636126e
commit 899b69a86d
1 changed files with 14 additions and 13 deletions

View File

@ -242,7 +242,7 @@ namespace CitizenMP.Server.Installer
{"DebugSymbols", false.ToString()},
{"OutputPath", binOutputDirectory.FullName},
{"AllowedReferenceRelatedFileExtensions", "\".mdb\"=\"\";\".pdb\"=\"\";\".xml\"=\"\""}
}, logpath))
}, options.Verbosity, logpath))
{
Console.Error.WriteLine("Build failed! Please look at {0} for more information.", logpath);
return 1;
@ -316,7 +316,7 @@ namespace CitizenMP.Server.Installer
}
private static bool Build(string projectFilePath, IDictionary<string, string> buildProperties,
string logPath = null)
LoggerVerbosity verbosity, string logPath = null)
{
var workspace = new FileInfo(projectFilePath).Directory;
if (workspace == null)
@ -335,7 +335,7 @@ namespace CitizenMP.Server.Installer
try
{
var pc = new ProjectCollection();
pc.RegisterLogger(new ConsoleLogger(LoggerVerbosity.Minimal));
pc.RegisterLogger(new ConsoleLogger(verbosity));
var loggers = new List<ILogger>();
if (logPath != null)
@ -346,7 +346,7 @@ namespace CitizenMP.Server.Installer
ShowSummary = true,
SkipProjectStartedText = true
});
loggers.Add(new ConsoleLogger(LoggerVerbosity.Quiet) {ShowSummary = false});
loggers.Add(new ConsoleLogger(verbosity) {ShowSummary = false});
// Import/Update Mozilla certs for NuGet to not fail out on non-Windows machines
if (!IsWin32())
@ -426,7 +426,8 @@ namespace CitizenMP.Server.Installer
private static void Run(string name, string args, Action<string, StreamWriter> lineProcessor = null)
{
using (var p = Process.Start(new ProcessStartInfo {
using (var p = Process.Start(new ProcessStartInfo
{
Arguments = args,
FileName = name,
UseShellExecute = false,