Esempio n. 1
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);
        }
        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);
        }