示例#1
0
        public override CakeReport RunTarget(string target)
        {
            var report = Engine.RunTarget(target);

            if (report != null && !report.IsEmpty)
            {
                _reportPrinter.Write(report);
            }
            return(report);
        }
示例#2
0
        /// <summary>
        /// Runs the specified target.
        /// </summary>
        /// <param name="target">The target to run.</param>
        /// <returns>The resulting report.</returns>
        public override CakeReport RunTarget(string target)
        {
            var strategy = new DefaultExecutionStrategy(_log);
            var report   = Engine.RunTarget(Context, strategy, target);

            if (report != null && !report.IsEmpty)
            {
                _reportPrinter.Write(report);
            }
            return(report);
        }
示例#3
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);
        }
示例#4
0
        /// <summary>
        /// Runs the specified target.
        /// </summary>
        /// <param name="target">The target to run.</param>
        /// <returns>The resulting report.</returns>
        public override async Task <CakeReport> RunTargetAsync(string target)
        {
            var strategy = new DefaultExecutionStrategy(_log);
            var report   = await Engine.RunTargetAsync(Context, strategy, target).ConfigureAwait(false);

            if (report != null && !report.IsEmpty)
            {
                _reportPrinter.Write(report);
            }
            return(report);
        }
示例#5
0
        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);
        }
示例#6
0
        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);
        }