Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Commit

Permalink
Add the missing nuspec metadata entries
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfowl committed Mar 18, 2015
1 parent d3ceb96 commit dd88a6e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
13 changes: 12 additions & 1 deletion src/Microsoft.Framework.PackageManager/Building/BuildManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ private string GetScriptVariable(string key)
private static void InitializeBuilder(Runtime.Project project, PackageBuilder builder)
{
builder.Authors.AddRange(project.Authors);
builder.Owners.AddRange(project.Owners);

if (builder.Authors.Count == 0)
{
Expand All @@ -248,14 +249,24 @@ private static void InitializeBuilder(Runtime.Project project, PackageBuilder bu
builder.Description = project.Description ?? project.Name;
builder.Id = project.Name;
builder.Version = project.Version;
builder.Title = project.Name;
builder.Title = project.Title;
builder.RequireLicenseAcceptance = project.RequireLicenseAcceptance;
builder.Tags.AddRange(project.Tags);

if (!string.IsNullOrEmpty(project.IconUrl))
{
builder.IconUrl = new Uri(project.IconUrl);
}

if (!string.IsNullOrEmpty(project.ProjectUrl))
{
builder.ProjectUrl = new Uri(project.ProjectUrl);
}

if (!string.IsNullOrEmpty(project.LicenseUrl))
{
builder.LicenseUrl = new Uri(project.LicenseUrl);
}
}

private void WriteSummary(List<ICompilationMessage> diagnostics)
Expand Down
17 changes: 15 additions & 2 deletions src/Microsoft.Framework.Runtime/Project.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,14 @@ public string ProjectDirectory

public string Name { get; private set; }

public string Title { get; set; }

public string Description { get; private set; }

public string[] Authors { get; private set; }

public string[] Owners { get; private set; }

public bool EmbedInteropTypes { get; set; }

public SemanticVersion Version { get; private set; }
Expand All @@ -64,12 +68,16 @@ public string ProjectDirectory

public string ProjectUrl { get; private set; }

public bool RequireLicenseAcceptance { get; private set; }
public string LicenseUrl { get; set; }

public bool IsLoadable { get; set; }
public string IconUrl { get; set; }

public bool RequireLicenseAcceptance { get; private set; }

public string[] Tags { get; private set; }

public bool IsLoadable { get; set; }

public ProjectFilesCollection Files { get; private set; }

public IDictionary<string, string> Commands { get; } = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Expand Down Expand Up @@ -151,6 +159,7 @@ internal static Project GetProjectFromStream(Stream stream, string projectName,
// Meta-data properties
var version = rawProject["version"];
var authors = rawProject["authors"];
var owners = rawProject["owners"];
var tags = rawProject["tags"];
var buildVersion = Environment.GetEnvironmentVariable("DNX_BUILD_VERSION");

Expand All @@ -176,11 +185,15 @@ internal static Project GetProjectFromStream(Stream stream, string projectName,
}

project.Description = rawProject.GetValue<string>("description");
project.Title = rawProject.GetValue<string>("title");
project.Authors = authors == null ? new string[] { } : authors.ValueAsArray<string>();
project.Owners = owners == null ? new string[] { } : owners.ValueAsArray<string>();
project.Dependencies = new List<LibraryDependency>();
project.WebRoot = rawProject.GetValue<string>("webroot");
project.EntryPoint = rawProject.GetValue<string>("entryPoint");
project.ProjectUrl = rawProject.GetValue<string>("projectUrl");
project.LicenseUrl = rawProject.GetValue<string>("licenseUrl");
project.IconUrl = rawProject.GetValue<string>("iconUrl");
project.RequireLicenseAcceptance = rawProject.GetValue<bool?>("requireLicenseAcceptance") ?? false;
project.Tags = tags == null ? new string[] { } : tags.ValueAsArray<string>();
project.IsLoadable = rawProject.GetValue<bool?>("loadable") ?? true;
Expand Down

0 comments on commit dd88a6e

Please sign in to comment.