Updating makefile.shade so build only-compile is pretty printed in
TeamCity
This commit is contained in:
parent
03d174efe2
commit
52a72e6b0e
|
|
@ -199,7 +199,13 @@ var buildTarget = "compile"
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Log.Info(string.Format("Building {0}", repo));
|
var blockName = string.Format("Building {0}", repo);
|
||||||
|
if (IsTeamCity)
|
||||||
|
{
|
||||||
|
Log.Info(string.Format("##teamcity[blockOpened name='{0}']", FormatForTeamCity(blockName)));
|
||||||
|
}
|
||||||
|
Log.Info(blockName);
|
||||||
|
|
||||||
if (IsMono)
|
if (IsMono)
|
||||||
{
|
{
|
||||||
Exec("build.sh", buildTarget, repo);
|
Exec("build.sh", buildTarget, repo);
|
||||||
|
|
@ -209,6 +215,11 @@ var buildTarget = "compile"
|
||||||
Exec("build.cmd", buildTarget, repo);
|
Exec("build.cmd", buildTarget, repo);
|
||||||
}
|
}
|
||||||
Log.Info(string.Format("Build {0} succeeded", repo));
|
Log.Info(string.Format("Build {0} succeeded", repo));
|
||||||
|
|
||||||
|
if (IsTeamCity)
|
||||||
|
{
|
||||||
|
Log.Info(string.Format("##teamcity[blockClosed name='{0}']", FormatForTeamCity(blockName)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch(Exception ex)
|
||||||
{
|
{
|
||||||
|
|
@ -216,12 +227,20 @@ var buildTarget = "compile"
|
||||||
failed[repo] = ex;
|
failed[repo] = ex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach(var repo in repos)
|
foreach(var repo in repos)
|
||||||
{
|
{
|
||||||
Exception ex;
|
Exception ex;
|
||||||
if (failed.TryGetValue(repo, out ex))
|
if (failed.TryGetValue(repo, out ex))
|
||||||
{
|
{
|
||||||
Log.Warn(string.Format("Build {0} failed: {1}", repo, ex.Message));
|
Log.Warn(string.Format("Build {0} failed: {1}", repo, ex.Message));
|
||||||
|
if (IsTeamCity)
|
||||||
|
{
|
||||||
|
Log.Warn(string.Format("##teamcity[message text='{0}' errorDetails='{1}' status='ERROR']",
|
||||||
|
FormatForTeamCity(ex.Message),
|
||||||
|
FormatForTeamCity(ex.StackTrace)));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -436,4 +455,13 @@ functions
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string FormatForTeamCity(string input)
|
||||||
|
{
|
||||||
|
return input.Replace("|", "||")
|
||||||
|
.Replace("'", "|'")
|
||||||
|
.Replace("\r", "|r")
|
||||||
|
.Replace("\n", "|n")
|
||||||
|
.Replace("]", "|]");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue