From 29b435267bdc933d073a486f0713d346aaee6179 Mon Sep 17 00:00:00 2001 From: Louis DeJardin Date: Wed, 12 Mar 2014 13:43:01 -0700 Subject: [PATCH] Adding some build targets for convenient git operations --- makefile.shade | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/makefile.shade b/makefile.shade index 7b398840e7..be98de0013 100644 --- a/makefile.shade +++ b/makefile.shade @@ -147,6 +147,30 @@ var repos='${new Dictionary { Exec(@"tools\TCDependencyManager\bin\Debug\TCDependencyManager.exe", "", ""); } +#git-status decription='Show status of repos known by Universe' + @{ + foreach(var repo in repos) + { + GitStatus(repo.Key); + } + } + +#git-clean decription='REMOVE ALL CHANGES to the working directory' + @{ + Console.WriteLine("This runs `git clean -xfd` in all non-Universe repos."); + Console.WriteLine("This should REMOVE ALL CHANGES to the working directory."); + Console.Write("***** Are you sure? ***** (Y or anything else)? "); + if (Console.ReadLine() != "Y") + { + throw new Exception("git-clean cancelled"); + } + foreach(var repo in repos) + { + GitClean(repo.Key); + } + } + + macro name='GitPull' gitUri='string' gitBranch='string' gitFolder='string' git-pull @@ -156,6 +180,12 @@ macro name='GitClone' gitUri='string' gitBranch='string' macro name='GitConfig' gitOptionName='string' gitOptionValue='string' gitFolder='string' git-config +macro name='GitStatus' gitFolder='string' + git gitCommand='status' + +macro name='GitClean' gitFolder='string' + git gitCommand='clean -xdf' + macro name='Exec' program='string' commandline='string' workingdir='string' exec