Esempio n. 1
0
 /// <summary>
 /// Writes a new blank line
 /// </summary>
 protected void AOT_NewLine()
 {
     StageOutput.Add(LineOutColored.NewLine());
     if (ShouldLogToConsoleRealTime)
     {
         Console.WriteLine();
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="ciSession">The SlugCI Session object</param>
        public SlugCI(CISession ciSession)
        {
            LineOutput.Add(LineOutColored.NewLine());
            Color lineColor = Color.WhiteSmoke;

            CISession                  = ciSession;
            CISession.SlugCIPath       = CISession.RootDirectory / ".slugci";
            CISession.SourceDirectory  = CISession.RootDirectory / "src";
            CISession.TestsDirectory   = CISession.RootDirectory / "tests";
            CISession.OutputDirectory  = CISession.RootDirectory / "artifacts";
            CISession.SlugCIFileName   = CISession.SlugCIPath / SLUG_CI_CONFIG_FILE;
            CISession.AngularDirectory = CISession.RootDirectory / "angular";
            CISession.CoveragePath     = CISession.OutputDirectory / "Coverage";
            CISession.TestOutputPath   = CISession.OutputDirectory / "Tests";

            ciSession.GitProcessor = new GitProcessor(ciSession);
        }
Esempio n. 3
0
        /// <summary>
        /// Writes the given text as Errored output to both BuildStage output and to the console real time.
        /// </summary>
        /// <param name="text"></param>
        protected void AOT_Error(Exception exception)
        {
            string exceptionSeparator = "************************  [ Exception Encountered ] ************************";
            int    start = StageOutput.Count;

            StageOutput.Add(LineOutColored.Error(exceptionSeparator));
            StageOutput.Add(LineOutColored.Error(exception.Message));
            StageOutput.Add(LineOutColored.Error(exceptionSeparator));
            StageOutput.Add(LineOutColored.NewLine());
            StageOutput.Add(LineOutColored.Error(exception.ToString()));
            StageOutput.Add(LineOutColored.NewLine());


            if (ShouldLogToConsoleRealTime)
            {
                Print_StageOutput(start);
            }
        }