Esempio n. 1
0
        static int Main(string[] args)
        {
            var root       = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory.TrimEnd('\\'));
            var buildTools = new BuildTools();
            var solution   = new OliveSolution(root, publish: args.Contains("-publish"));

            try
            {
                buildTools.Build();
                solution.Build();

                if (args.Contains("-log"))
                {
                    buildTools.PrintLog();
                    solution.PrintLog();
                }

                return(0);
            }
            catch (Exception ex)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine(ex.Message);
                Console.ResetColor();

                buildTools.PrintLog();
                solution.PrintLog();
                return(-1);
            }
        }
Esempio n. 2
0
        static int Main(string[] args)
        {
            Log = args.Contains("-log");

            var result = 0;

            if (args.Lacks("-notools"))
            {
                var buildTools = new BuildTools();
                result = Run(buildTools.Build, buildTools.PrintLog);
                if (result != 0)
                {
                    return(result);
                }
            }

            if (args.Lacks("-tools"))
            {
                var root = new DirectoryInfo(Environment.CurrentDirectory.TrimEnd('\\'));

                Console.WriteLine("Build started for: " + root.FullName);
                Console.WriteLine();

                var solution = new OliveSolution(root, publish: args.Contains("-publish"));
                result = Run(solution.Build, solution.PrintLog);
            }

            return(result);
        }