/// <summary>
        /// Run the resulting target from building the build pipeline of this build configuration.
        /// </summary>
        /// <returns></returns>
        public RunStepResult Run()
        {
            var pipeline = GetBuildPipeline();

            if (!CanRun(out var reason))
            {
                return(RunStepResult.Failure(this, pipeline?.RunStep, reason));
            }
            return(pipeline.Run(this));
        }
        /// <summary>
        /// Run the resulting target from building the <see cref="BuildPipeline"/> of this <see cref="BuildSettings"/>.
        /// </summary>
        /// <returns></returns>
        public RunStepResult Run()
        {
            var pipeline = GetBuildPipeline();

            if (!CanRun(out var reason))
            {
                return(RunStepResult.Failure(this, pipeline?.RunStep, reason));
            }

            if (pipeline == null)
            {
                throw new NullReferenceException(nameof(pipeline));
            }

            return(pipeline.Run(this));
        }
Esempio n. 3
0
        /// <summary>
        /// Run this <see cref="BuildPipeline"/>.
        /// This will attempt to run the build target produced from building this <see cref="BuildPipeline"/>.
        /// </summary>
        /// <param name="config"></param>
        /// <returns>The result of running this <see cref="BuildPipeline"/>.</returns>
        public RunStepResult Run(BuildConfiguration config)
        {
            if (!CanRun(config, out var reason))
            {
                return(RunStepResult.Failure(config, RunStep, reason));
            }

            try
            {
                return(RunStep.Start(config));
            }
            catch (Exception exception)
            {
                return(RunStepResult.Exception(config, RunStep, exception));
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Run this <see cref="BuildPipeline"/>.
        /// This will attempt to run the build target produced from building this <see cref="BuildPipeline"/>.
        /// </summary>
        /// <param name="settings"></param>
        /// <returns>The result of running this <see cref="BuildPipeline"/>.</returns>
        public RunStepResult Run(BuildSettings settings)
        {
            if (!CanRun(settings, out var reason))
            {
                return(RunStepResult.Failure(settings, RunStep, reason));
            }

            try
            {
                return(RunStep.Start(settings));
            }
            catch (Exception exception)
            {
                return(RunStepResult.Exception(settings, RunStep, exception));
            }
        }
Esempio n. 5
0
 public RunStepResult Failure(BuildConfiguration config, string message) => RunStepResult.Failure(config, this, message);
Esempio n. 6
0
 public RunStepResult Success(BuildConfiguration config, IRunInstance instance) => RunStepResult.Success(config, this, instance);
Esempio n. 7
0
 public RunStepResult Failure(BuildSettings settings, string message) => RunStepResult.Failure(settings, this, message);
Esempio n. 8
0
 public RunStepResult Success(BuildSettings settings, IRunInstance instance) => RunStepResult.Success(settings, this, instance);