Created
January 20, 2021 07:53
-
-
Save janmechtel/d1ffb11f5907c7e9f4455b612f9794c4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void Run(Expression<Action> action) { | |
System.Console.WriteLine("================================================"); | |
var method = action.Body as MethodCallExpression; | |
if(method != null) | |
Console.WriteLine(method.Method.Name); | |
System.Console.WriteLine("================================================"); | |
System.Console.WriteLine(""); | |
action.Compile().Invoke(); | |
System.Console.WriteLine("------------------------------------------------"); | |
System.Console.WriteLine(""); | |
} | |
static void Main(string[] args) | |
{ | |
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; | |
if (args.Length > 0) | |
{ | |
string path = args[0]; | |
Console.WriteLine("Trying path: " + path); | |
if (!Directory.Exists(path)) | |
{ | |
Console.WriteLine("Path not found, using debug path instead"); | |
} | |
else | |
{ | |
BaseDirectory = path; | |
} | |
} | |
Run(() => parseFolderTree()); | |
templates = JsonConvert. DeserializeObject(System.IO.File.ReadAllText(Path.Combine(BaseDirectory, @"Models\Template.json"))); | |
#if !DEBUG | |
Run(() => copyTemplatesIntoFolders()); | |
Run(() => createContentZips()); | |
#endif | |
Run(() => createFoldersXLSOverview()); | |
Run(() => createDataSourcesXLS()); | |
Run(() => createBindingsXLS()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment