From acdf8aa3bd296f926d38d0724ff06ffd9dbd9274 Mon Sep 17 00:00:00 2001 From: Louis DeJardin Date: Thu, 23 Jan 2014 13:54:11 -0800 Subject: [PATCH] Recursing to compile continues to other repos on errors displays summary at end --- Sakefile.shade | 37 ++++++++++++++++++++++++++++++++++--- build/_git-clone.shade | 1 + 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/Sakefile.shade b/Sakefile.shade index 90793f4ced..9202012f77 100644 --- a/Sakefile.shade +++ b/Sakefile.shade @@ -16,10 +16,10 @@ var repos='${new Dictionary { {"Mvc", "git@github.com:aspnet/Mvc.git"}, }}' -#default .pull .install +#default .compile #pull - +#compile .pull #install .pull #git-pull target='pull' @@ -37,7 +37,38 @@ var repos='${new Dictionary { } } -#build-install target='install' +#only-compile target='compile' + @{ + var failed = new Dictionary(); + foreach(var repo in repos) + { + try + { + Log.Info(string.Format("Building {0}", repo.Key)); + Exec("build.cmd", "compile", repo.Key); + Log.Info(string.Format("Build {0} succeeded", repo.Key)); + } + catch(Exception ex) + { + Log.Warn(string.Format("Build {0} failed: {1}", repo.Key, ex.Message)); + failed[repo.Key] = ex; + } + } + foreach(var repo in repos) + { + Exception ex; + if (failed.TryGetValue(repo.Key, out ex)) + { + Log.Warn(string.Format("Build {0} failed: {1}", repo.Key, ex.Message)); + } + else + { + Log.Info(string.Format("Build {0} succeeded", repo.Key)); + } + } + } + +#only-install target='install' @{ foreach(var repo in repos) { diff --git a/build/_git-clone.shade b/build/_git-clone.shade index 0d673a0b03..32355ab5a3 100644 --- a/build/_git-clone.shade +++ b/build/_git-clone.shade @@ -1,5 +1,6 @@ + default gitBranch='' var gitCommand='clone ${gitUri}'