Minor fixes for UpdateAssemblyInfo/Program.cs (now works too if git not installed)

This commit is contained in:
niksedk 2014-02-05 18:50:52 +01:00
parent 1eae4682e6
commit f4465b1c59
2 changed files with 3 additions and 4 deletions

View File

@ -27,7 +27,7 @@ namespace UpdateAssemblyInfo
return false;
}
p.BeginOutputReadLine(); // Async reading of output to prevent deadlock
if (p.WaitForExit(9000))
if (p.WaitForExit(5000))
{
return true;
}

View File

@ -57,8 +57,7 @@ namespace UpdateAssemblyInfo
var clrHash = new CommandLineRunner();
var rcGitHash = clrHash.RunCommandAndGetOutput(GetGitPath(), "rev-parse --verify HEAD", workingFolder);
var clrTags = new CommandLineRunner();
var rcGitTags = clrTags.RunCommandAndGetOutput(GetGitPath(), "describe --tags", workingFolder);
if (rcGitHash && rcGitTags)
if (rcGitHash && clrTags.RunCommandAndGetOutput(GetGitPath(), "describe --tags", workingFolder))
{
try
{
@ -78,7 +77,7 @@ namespace UpdateAssemblyInfo
{
// allow for compile without git
DoUpdateAssembly("[GITHASH]", string.Empty, template, target);
DoUpdateAssembly("[REVNO]", "0", template, target);
DoUpdateAssembly("[REVNO]", "0", target, target);
}
catch
{