/// <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));
        }
Ejemplo n.º 2
0
        /// <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));
        }
Ejemplo 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));
            }
        }
Ejemplo 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));
            }
        }
Ejemplo n.º 5
0
 public RunStepResult Failure(BuildConfiguration config, string message) => RunStepResult.Failure(config, this, message);
Ejemplo n.º 6
0
 public RunStepResult Success(BuildConfiguration config, IRunInstance instance) => RunStepResult.Success(config, this, instance);
Ejemplo n.º 7
0
 public RunStepResult Failure(BuildSettings settings, string message) => RunStepResult.Failure(settings, this, message);
Ejemplo n.º 8
0
 public RunStepResult Success(BuildSettings settings, IRunInstance instance) => RunStepResult.Success(settings, this, instance);