public static void Initialize() { //***********************************************// // // // do not use Configuration before this line // // // //***********************************************// var config = LibationScaffolding.RunPreConfigMigrations(); LibationScaffolding.RunPostConfigMigrations(config); LibationScaffolding.RunPostMigrationScaffolding(config); #if !DEBUG checkForUpdate(); #endif }
private static void checkForUpdate() { var(hasUpgrade, zipUrl, htmlUrl, zipName) = LibationScaffolding.GetLatestRelease(); if (!hasUpgrade) { return; } var origColor = Console.ForegroundColor; try { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine($"UPDATE AVAILABLE @ {zipUrl}"); } finally { Console.ForegroundColor = origColor; } }