/// <summary> /// Exectutes the watch action. /// </summary> /// <returns>CLI return code.</returns> public override int Run() { int result = 0; _logger.StartWatcherBooting(); List <string> paths = GetWatchPaths(); if (paths.Count > 0) { _watchers = CreateWatchers(paths); _logger.StopWatcherBooting(); _logger.WatchingForPaths(paths); _logger.InitialCompilation(); _compiler.Run(); while (true) { } ; } else { _logger.NoWatchableFilesFound(); } return(result); }
/// <summary> /// Runs the compile action. /// </summary> /// <param name="options">CLI options for the compile action.</param> /// <param name="fromMain">Wheter or not this is called from the main method.</param> /// <returns>CLI return code.</returns> private static int Compile(CompileOptions options, bool fromMain = true) { CompileAction compiler = new CompileAction(options); int result = compiler.Run(); #if DEBUG if (fromMain == true) { Console.Read(); } #endif return(result); }
/// <summary> /// Runs the deployment action. /// </summary> /// <returns></returns> public override int Run() { int result = 0; if (_compiler.Run() == 0) { SanitizedConfiguration config = LoadConfiguration(); if (config != null) { _logger.StartScriptDeployment(); result = Deploy(_compiler.CompiledScripts, config); _logger.StopScriptDeployment(_compiler.CompiledScripts.Count); } } return(result); }