public PackageParams(NugetSpec spec, SemanticVersion version, string outputPath, bool createSymbols) { Spec = spec; Version = version; OutputPath = outputPath; CreateSymbols = createSymbols; }
public string CreatePackage(NugetSpec spec, SemanticVersion version, string outputPath) { var builder = packageBuilderFor(spec, version); var nupkgFileName = Path.Combine(outputPath, "{0}.{1}.nupkg".ToFormat(spec.Name, version)); createPackage(builder, nupkgFileName); return nupkgFileName; }
public void SetUp() { var theFilename = "fubumvc.core.nuspec"; var stream = GetType() .Assembly .GetManifestResourceStream(typeof(DataMother), "FubuMVCNuspecTemplate.txt"); new FileSystem().WriteStreamToFile(theFilename, stream); theSpec = NugetSpec.ReadFrom(theFilename.ToFullPath()); }
public static NugetSpec ReadFrom(string filename) { var document = new NuspecDocument(filename); var spec = new NugetSpec(document.Name, filename); spec._dependencies.AddRange(document.FindDependencies()); spec._publishedAssemblies.AddRange(document.FindPublishedAssemblies()); return(spec); }
public static NugetSpec ReadFrom(string filename) { var document = new NuspecDocument(filename); var spec = new NugetSpec(document.Name, filename); spec._dependencies.AddRange(document.FindDependencies()); spec._publishedAssemblies.AddRange(document.FindPublishedAssemblies()); return spec; }
public void add_a_nuget_spec_should_add_it_to_the_collection_and_set_itself_as_the_publisher_to_the_spec() { var spec = new NugetSpec("fubucore", "somefile.nuspec"); var solution = new Solution(new SolutionConfig() { SourceFolder = "src" }, "directory1"); solution.AddNugetSpec(spec); spec.Publisher.ShouldBeTheSameAs(solution); solution.PublishedNugets.ShouldContain(spec); }
public string CreatePackage(NugetSpec spec, SemanticVersion version, string outputPath) { var builder = packageBuilderFor(spec, version); var nupkgFileName = Path.Combine(outputPath, "{0}.{1}.nupkg".ToFormat(spec.Name, version)); var package = createPackage(builder, nupkgFileName); var issues = package.Validate(Rules); if (issues.Any(x => x.Level == PackageIssueLevel.Error)) { Console.ForegroundColor = ConsoleColor.Red; issues.Each(issue => Console.WriteLine("[{0}] {1} - {2}", issue.Level, issue.Title, issue.Description)); Console.ResetColor(); RippleAssert.Fail("Package failed validation"); } return nupkgFileName; }
public void get_nuget_directory() { var solution = new Solution { SourceFolder = "source", Directory = ".".ToFullPath() }; var storage = new StubNugetStorage(); storage.Add("FubuCore", "0.9.1.37"); solution.UseStorage(storage); var project = new Project("something.csproj"); var dependency = new Dependency("FubuCore", "0.9.1.37"); project.AddDependency(dependency); solution.AddProject(project); var spec = new NugetSpec("FubuCore", "somefile.nuspec"); solution.NugetFolderFor(spec) .ShouldEqual(".".ToFullPath().AppendPath(solution.PackagesDirectory(), "FubuCore")); }
public void SetUp() { theSolution = new Solution(); p1 = theSolution.AddProject("MyProject"); p1.AddDependency("Bottles"); p1.AddDependency("FubuCore"); p1.AddDependency("FubuLocalization"); p2 = theSolution.AddProject("MyOtherProject"); p2.AddDependency("FubuMVC.Core"); theSolution.AddDependency(new Dependency("Bottles", "1.0.0.0", UpdateMode.Fixed)); theSolution.AddDependency(new Dependency("FubuCore", "1.1.0.0", UpdateMode.Float)); theSolution.AddDependency(new Dependency("FubuLocalization", "1.2.0.0", UpdateMode.Fixed)); theSolution.AddDependency(new Dependency("FubuMVC.Core", "1.4.0.0", UpdateMode.Fixed)); theNugetSpec = new NugetSpec("MyProject", "myproject.nuspec"); // explicit dependencies are not overridden theNugetSpec.Dependencies.Add(new NuspecDependency("Bottles", "1.0.0.0")); theGroup = new SpecGroup(theNugetSpec, new[] { p1, p2 }); }
public string NugetFolderFor(NugetSpec spec) { var dependency = Projects.SelectMany(x => x.NugetDependencies).Distinct() .Single(x => x.Name == spec.Name); return _directory.AppendPath(_config.SourceFolder, "packages", spec.Name + "." + dependency.Version); }
public MoveNugetAssemblies(NugetSpec nuget, Solution destination) { _nuget = nuget; _destination = destination; }
public void SetUp() { var file = FileSystem.Combine("..", "..", "data", "fubumvc","packaging", "nuget", "fubumvc.references.nuspec"); theSpec = NugetSpec.ReadFrom(file.ToFullPath()); }
private PackageBuilder symbolsPackageBuilderFor(NugetSpec spec, SemanticVersion version) { return packageBuilderFor(spec, version); }
private void verifyVersion(NugetSpec spec, string name, string version) { spec.FindDependency(name).VersionSpec.ToString().ShouldEqual(version); }
public ProjectNuspec(Project project, NugetSpec spec) { _project = project; _spec = spec; }
public SpecGroup(NugetSpec spec, IEnumerable<Project> projects) { Spec = spec; Projects = projects; }
protected bool Equals(NugetSpec other) { return(_filename.EqualsIgnoreCase(other._filename)); }
private PackageBuilder packageBuilderFor(NugetSpec spec, SemanticVersion version) { return new PackageBuilder(spec.Filename, NullPropertyProvider.Instance, true) { Version = version }; }
public void AddNugetSpec(NugetSpec spec) { _published.Add(spec); spec.Publisher = this; }
public string NugetFolderFor(NugetSpec spec) { var nugetName = spec.Name; return NugetFolderFor(nugetName); }
protected bool Equals(NugetSpec other) { return _filename.EqualsIgnoreCase(other._filename); }
public void get_nuget_directory() { var solution = new Solution(new SolutionConfig() { SourceFolder = "source" }, ".".ToFullPath()); var project = new Project("something.csproj"); var dependency = new NugetDependency("FubuCore", "0.9.1.37"); project.AddDependency(dependency); solution.AddProject(project); var spec = new NugetSpec("FubuCore", "somefile.nuspec"); solution.NugetFolderFor(spec) .ShouldEqual(".".ToFullPath().AppendPath(solution.Config.SourceFolder, "packages", "FubuCore.0.9.1.37")); }
private PackageBuilder packageBuilderFor(NugetSpec spec, SemanticVersion version) { try { return new PackageBuilder(spec.Filename, NullPropertyProvider.Instance, true) { Version = version }; } catch (Exception exc) { RippleAssert.Fail("Error creating package: " + exc.Message); return null; } }
public SpecGroup(NugetSpec spec, IEnumerable <Project> projects) { Spec = spec; Projects = projects; }