Ejemplo n.º 1
0
        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
        }
Ejemplo n.º 2
0
        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;
            }
        }