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

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

View File

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