public override async Task <bool> ExecuteAsync(ICakeEngine engine, CakeHostOptions options) { _executionSettings.SetTarget(options.Target); var report = await engine.RunTargetAsync(_context, _strategy, _executionSettings).ConfigureAwait(false); if (report != null && !report.IsEmpty) { _printer.Write(report); } return(true); }
public override bool Execute(ICakeEngine engine, CakeHostOptions options) { _executionSettings.SetTarget(options.Target); var report = engine.RunTargetAsync(_context, _strategy, _executionSettings).GetAwaiter().GetResult(); if (report != null && !report.IsEmpty) { _printer.Write(report); } return(true); }
public override async Task <bool> ExecuteAsync(ICakeEngine engine, CakeHostOptions options) { _executionSettings.SetTarget(options.Target); _log.Information("Performing dry run..."); _log.Information("Target is: {0}", options.Target); _log.Information(string.Empty); var strategy = new DryRunExecutionStrategy(_log); await engine.RunTargetAsync(_context, strategy, _executionSettings).ConfigureAwait(false); _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 Task <CakeReport> RunTargetAsync(ICakeContext context, IExecutionStrategy strategy, string target) { return(_engine.RunTargetAsync(context, strategy, target)); }
public Task <CakeReport> RunTargetAsync(ICakeContext context, IExecutionStrategy strategy, ExecutionSettings settings) { return(_cakeEngine.RunTargetAsync(context, strategy, settings)); }