Exemplo n.º 1
0
        public void Execute(RippleInput input, IRippleStepRunner runner)
        {
            var feeds = Solution.Feeds.ToArray();

            if (input is IOverrideFeeds)
            {
                var overrides = input.As <IOverrideFeeds>().Feeds();
                if (overrides.Any())
                {
                    Solution.ClearFeeds();
                    Solution.AddFeeds(overrides);
                }
            }

            var missing = Solution.MissingNugets().ToList();
            var nugets  = new List <INugetFile>();

            if (missing.Any())
            {
                var tasks = missing.Select(x => restore(x, Solution, nugets)).ToArray();

                Task.WaitAll(tasks);
            }

            Solution.ClearFeeds();
            Solution.AddFeeds(feeds);

            runner.Set(new DownloadedNugets(nugets));
        }
Exemplo n.º 2
0
        public void Execute(RippleInput input, IRippleStepRunner runner)
        {
            var nugetRunner   = new NugetStepRunner(Solution);
            var aggregatePlan = PlanFor(input.As <INugetOperationContext>(), Solution);

            if (aggregatePlan.Any())
            {
                RippleLog.InfoMessage(aggregatePlan);
            }

            aggregatePlan.Execute(nugetRunner);
        }
Exemplo n.º 3
0
        public void Execute(RippleInput input, IRippleStepRunner runner)
        {
            var missing = runner.Get <DownloadedNugets>();

            if (missing.Any())
            {
                Solution.AssertNoLockedFiles();
            }

            missing.Each(nuget =>
            {
                var dir = Solution.PackagesDirectory();
                RippleLog.Debug("Exploding " + nuget.ToString());
                nuget.ExplodeTo(dir);
            });
        }
Exemplo n.º 4
0
        public static RippleOperation For <T>(RippleInput input, Solution solution)
        {
            var target = _target ?? solution;

            var description = input.DescribePlan(solution);

            if (description.IsNotEmpty())
            {
                RippleLog.Info(description);
            }

            input.Apply(target);

            var runner = new RippleStepRunner(new FileSystem());

            return(new RippleOperation(target, input, runner));
        }
        public void Execute(RippleInput input, IRippleStepRunner runner)
        {
            var feeds = Solution.Feeds.ToArray();

            if (input is IOverrideFeeds)
            {
                var overrides = input.As <IOverrideFeeds>().Feeds();
                if (overrides.Any())
                {
                    Solution.ClearFeeds();
                    Solution.AddFeeds(overrides);
                }
            }

            if (input is IAllowExplicitBranch)
            {
                var branchingInput = input.As <IAllowExplicitBranch>();
                if (branchingInput.BranchFlag.IsNotEmpty())
                {
                    BranchDetector.SetBranch(branchingInput.BranchFlag);
                }
            }

            var missing = Solution.MissingNugets().ToList();
            var nugets  = new List <INugetFile>();
            var report  = new MissingNugetReport();

            if (missing.Any())
            {
                var tasks = missing.Select(x => restore(x, Solution, report, nugets)).ToArray();
                Task.WaitAll(tasks);
            }

            Solution.ClearFeeds();
            Solution.AddFeeds(feeds);

            if (!report.IsValid())
            {
                RippleLog.InfoMessage(report);
                RippleAssert.Fail("Could not restore dependencies");
            }

            runner.Set(new DownloadedNugets(nugets));
        }
Exemplo n.º 6
0
 public static Solution For(RippleInput input)
 {
     return(SolutionBuilder.ReadFromCurrentDirectory());
 }
Exemplo n.º 7
0
 public static Solution For(RippleInput input)
 {
     // TODO -- Need to allow a specific solution
     // TODO -- Need to be smarter about the current directory maybe
     return(SolutionBuilder.ReadFromCurrentDirectory());
 }
Exemplo n.º 8
0
 public void Execute(RippleInput input, IRippleStepRunner runner)
 {
     Executed = true;
 }
Exemplo n.º 9
0
 public void Execute(RippleInput input, IRippleStepRunner runner)
 {
     DirectiveProcessor.ProcessDirectives(Solution);
 }
Exemplo n.º 10
0
 public RippleOperation(Solution solution, RippleInput input, IRippleStepRunner runner)
 {
     _solution = solution;
     _input    = input;
     _runner   = runner;
 }
Exemplo n.º 11
0
 public void Execute(RippleInput input, IRippleStepRunner runner)
 {
     execute((T)input, runner);
 }
Exemplo n.º 12
0
        public void Execute(RippleInput input, IRippleStepRunner runner)
        {
            var attacher = new ReferenceAttacher(Solution);

            attacher.Attach();
        }