From ccaaaeb392ce4df2551569b030b9a5272d8f2cd4 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Tue, 25 Mar 2014 22:19:14 -0700 Subject: [PATCH] Adding asmdiff.shade --- build/_asmdiff.shade | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 build/_asmdiff.shade diff --git a/build/_asmdiff.shade b/build/_asmdiff.shade new file mode 100644 index 0000000000..6e9c492c0c --- /dev/null +++ b/build/_asmdiff.shade @@ -0,0 +1,25 @@ +default ASM_DIFF='${Environment.GetEnvironmentVariable("ASM_DIFF")}' +default outFile = "artifacts\default.html" +@{ + if (String.IsNullOrEmpty(ASM_DIFF)) + { + Log.Warn("ASM_DIFF environment variable not set."); + Environment.Exit(-1); + return; + } +} + +exec program='${ASM_DIFF}' commandline='${oldBinariesDir} ${newBinariesDir} -adm -out:${outFile}' + +@{ + if (!String.IsNullOrEmpty(Environment.GetEnvironmentVariable("TEAMCITY_VERSION"))) + { + var message = File.ReadAllText(outFile) + .Replace("|", "||") + .Replace("'", "|'") + .Replace("\r", "|r") + .Replace("\n", "|n") + .Replace("]", "|]"); + Log.Info("##teamcity[message text='" + message + "' status='WARNING']"); + } +} \ No newline at end of file