// Tested manually. public void Execute(IRippleStepRunner runner) { string packageFolder; try { packageFolder = _destination.NugetFolderFor(_nuget); } catch (ArgumentOutOfRangeException exc) { RippleLog.Error(ToString(), exc); throw; } runner.CleanDirectory(packageFolder); _nuget.PublishedAssemblies.Each(x => { var request = new FileCopyRequest { From = x.Directory, Matching = new FileSet { Include = x.Pattern }, To = packageFolder.AppendPath(x.SubFolder.Replace('/', Path.DirectorySeparatorChar)) }; runner.CopyFiles(request); }); }
// Tested manually. public void Execute(IRippleStepRunner runner) { string packageFolder; try { packageFolder = _destination.NugetFolderFor(_nuget); } catch (ArgumentOutOfRangeException exc) { RippleLog.Error(ToString(), exc); throw; } runner.CleanDirectory(packageFolder); _nuget.PublishedAssemblies.Each(x => { var request = new FileCopyRequest{ From = x.Directory, Matching = new FileSet{Include = x.Pattern}, To = packageFolder.AppendPath(x.SubFolder.Replace('/', Path.DirectorySeparatorChar)) }; runner.CopyFiles(request); }); }
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>(); 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)); }
public void Execute(SolutionInput 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)); }
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)); }
protected override void execute(HistoryInput input, IRippleStepRunner runner) { var list = new List <string>(); var local = Solution.LocalDependencies(); local.All().Each(x => list.Add("{0}/{1}".ToFormat(x.Name, x.Version))); var historyFile = Solution.Directory.AppendPath(input.ArtifactsFlag, "dependency-history.txt"); Console.WriteLine("Writing nuget dependency history to " + historyFile); list.Each(x => Console.WriteLine(x)); var system = new FileSystem(); if (!system.DirectoryExists(Solution.Directory, input.ArtifactsFlag)) { system.CreateDirectory(Solution.Directory, input.ArtifactsFlag); } system.AlterFlatFile(historyFile, record => { record.Clear(); record.AddRange(list); }); }
public void Execute(SolutionInput input, IRippleStepRunner runner) { var nugetRunner = new NugetStepRunner(Solution); var aggregatePlan = PlanFor(input.As<INugetOperationContext>(), Solution); RippleLog.InfoMessage(aggregatePlan); aggregatePlan.Execute(nugetRunner); }
public void SetUp() { theSolution = new Solution(new SolutionConfig(), "some directory"); theBuild = new BuildSolution(theSolution); theRunner = MockRepository.GenerateMock<IRippleStepRunner>(); theBuild.Execute(theRunner); }
public void Execute(SolutionInput input, IRippleStepRunner runner) { var nugetRunner = new NugetStepRunner(Solution); var aggregatePlan = PlanFor(input.As <INugetOperationContext>(), Solution); RippleLog.InfoMessage(aggregatePlan); aggregatePlan.Execute(nugetRunner); }
protected override void execute(CreatePackagesInput input, IRippleStepRunner runner) { if (!input.UpdateDependenciesFlag) { return; } var groups = input.SpecsFor(Solution).ToArray(); groups.Each(x => updateSpecification(input, x, groups)); }
public void Execute(IRippleStepRunner runner) { try { runner.BuildSolution(_solution); } finally { runner.Trace(OpenLogMessage, _solution.Name); } }
public void Execute(SolutionInput input, IRippleStepRunner runner) { var missing = runner.Get<DownloadedNugets>(); missing.Each(nuget => { var dir = Solution.PackagesDirectory(); RippleLog.Debug("Exploding " + nuget.ToString()); nuget.ExplodeTo(dir); }); }
protected override void execute(CreatePackagesInput input, IRippleStepRunner runner) { new FileSystem().CreateDirectory(input.DestinationFlag); Solution.Specifications.Each(spec => { var version = input.VersionFlag; RippleLog.Info("Building the nuget spec file at " + spec.Filename + " as version " + version); Solution.Package(new PackageParams(spec, SemanticVersion.Parse(version), input.DestinationFlag, input.CreateSymbolsFlag)); ConsoleWriter.PrintHorizontalLine(); }); }
protected override void execute(RemoveInput input, IRippleStepRunner runner) { var projects = determineProjects(input); projects.Each(project => removeFromProject(project, input)); var stillReferenced = Solution.Projects.Any(project => project.Dependencies.Has(input.Nuget)); if (!stillReferenced) { Solution.RemoveDependency(input.Nuget); new FileSystem().ForceClean(Solution.NugetFolderFor(input.Nuget)); } }
public void SetUp() { theSolution = new Solution(new SolutionConfig(), "some directory"); theBuild = new BuildSolution(theSolution); theRunner = MockRepository.GenerateMock<IRippleStepRunner>(); theException = new NotImplementedException(); theRunner.Expect(x => x.BuildSolution(theSolution)).Throw(theException); Exception<NotImplementedException>.ShouldBeThrownBy(() => { theBuild.Execute(theRunner); }).ShouldBeTheSameAs(theException); }
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); }); }
// Tested manually. public void Execute(IRippleStepRunner runner) { var packageFolder = _destination.NugetFolderFor(_nuget); runner.CleanDirectory(packageFolder); _nuget.PublishedAssemblies.Each(x => { var request = new FileCopyRequest{ From = x.Directory, Matching = new FileSet{Include = x.Pattern}, To = packageFolder.AppendPath(x.SubFolder.Replace('/', Path.DirectorySeparatorChar)) }; runner.CopyFiles(request); }); }
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); }); }
protected override void execute(FloatInput input, IRippleStepRunner runner) { var dependency = Solution.Dependencies.Find(input.Name); if (dependency == null) { RippleAssert.Fail("Could not find " + input.Name); return; } dependency.Float(); if (input.MinVersionFlag.IsNotEmpty()) { dependency.Version = input.MinVersionFlag; } }
protected override void execute(CreatePackagesInput input, IRippleStepRunner runner) { // TODO -- Get this from the solution var generator = NuspecGenerator.Basic(); var plan = generator.PlanFor(Solution, input.Version()); if (input.PreviewFlag) { RippleLog.InfoMessage(plan); return; } RippleLog.DebugMessage(plan); var report = plan.Execute(input.UpdateDependenciesFlag); runner.Set(report); }
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)); }
protected override void execute(CreatePackagesInput input, IRippleStepRunner runner) { runner.CreateDirectory(input.DestinationFlag); var report = runner.Get <NuspecGenerationReport>(); if (report == null) { throw new InvalidOperationException("Could not find generation report"); } report.NuspecFiles.Each(file => { var version = input.Version(); RippleLog.Info("Building the nuget spec file at " + file + " as version " + version); Solution.Package(new PackageParams(NugetSpec.ReadFrom(file), version, input.DestinationFlag, input.CreateSymbolsFlag)); RippleLog.Info(ConsoleWriter.HL); }); }
public RippleRunner(IRippleLogger logger, IRippleStepRunner runner) { _logger = logger; _runner = runner; }
protected override void execute(UpdateInput input, IRippleStepRunner runner) { throw new NotImplementedException(); }
public void Execute(RippleInput input, IRippleStepRunner runner) { Executed = true; }
public void Execute(SolutionInput input, IRippleStepRunner runner) { DirectiveProcessor.ProcessDirectives(Solution); }
public void Execute(SolutionInput input, IRippleStepRunner runner) { execute((T)input, runner); }
public void Execute(RippleInput input, IRippleStepRunner runner) { DirectiveProcessor.ProcessDirectives(Solution); }
public void Execute(SolutionInput input, IRippleStepRunner runner) { Solution.AssertIsValid(); }
public void Execute(IRippleStepRunner runner) { _steps.Each(x => x.Execute(runner)); }
public RippleOperation(Solution solution, RippleInput input, IRippleStepRunner runner) { _solution = solution; _input = input; _runner = runner; }
public void Execute(SolutionInput input, IRippleStepRunner runner) { var attacher = new ReferenceAttacher(Solution); attacher.Attach(); }
protected abstract void execute(T input, IRippleStepRunner runner);