Пример #1
0
        public override bool Execute(ICakeEngine engine, CakeHostOptions options)
        {
            var report = engine.RunTarget(_context, _strategy, options.Target);

            if (report != null && !report.IsEmpty)
            {
                _printer.Write(report);
            }

            return(true);
        }
Пример #2
0
        public override bool Execute(ICakeEngine engine, CakeHostOptions options)
        {
            _log.Information("Performing dry run...");
            _log.Information("Target is: {0}", options.Target);
            _log.Information(string.Empty);

            var strategy = new DryRunExecutionStrategy(_log);

            engine.RunTarget(_context, strategy, options.Target);

            _log.Information(string.Empty);
            _log.Information("This was a dry run.");
            _log.Information("No tasks were actually executed.");

            return(true);
        }
 /// <summary>
 ///     Runs the specified target using the specified <see cref="T:Cake.Core.IExecutionStrategy" />.
 /// </summary>
 /// <param name="context">The context.</param>
 /// <param name="strategy">The execution strategy.</param>
 /// <param name="target">The target to run.</param>
 /// <returns>The resulting report.</returns>
 public CakeReport RunTarget(ICakeContext context, IExecutionStrategy strategy, string target)
 {
     return(_engine.RunTarget(context, strategy, target));
 }