adds notes

This commit is contained in:
Shannon
2017-04-21 19:27:17 +10:00
parent 068005dc16
commit 1bf0d66b7a
2 changed files with 8 additions and 2 deletions
@@ -37,7 +37,7 @@ namespace OurUmbraco.Repository.Models
/// <summary>
/// A list of all supported/targeted Umbraco versions for all files for this package
/// </summary>
public List<string> TargetedUmbracoVersions { get; set; }
public string[] TargetedUmbracoVersions { get; set; }
public List<ExternalSource> ExternalSources { get; set; }
@@ -205,7 +205,7 @@ namespace OurUmbraco.Repository.Services
var packageDetails = new PackageDetails(package)
{
TargetedUmbracoVersions = GetAllFilePackageVersions(allPackageFiles).Select(x => x.ToString(3)).ToList(),
TargetedUmbracoVersions = GetAllFilePackageVersions(allPackageFiles).Select(x => x.ToString(3)).ToArray(),
Compatibility = GetPackageCompatibility(content),
NetVersion = content.GetPropertyValue<string>("dotNetVersion"),
LicenseName = content.GetPropertyValue<string>("licenseName"),
@@ -218,6 +218,12 @@ namespace OurUmbraco.Repository.Services
//if no version or not strict version dependencies, return the current release file
if (currentUmbracoVersion == null || strictPackageFileVersions.Length == 0)
{
//TODO: Now we have to do the opposite of below and filter out any package file versions that have strict
// umbraco dependencies applied. Anything that has 7.5 (which would be the very minimum strict dependency) we can check for
// and then we must also consider that version 7.5.x will never send up a `currentUmbracoVersion` string, however,
// we will know if it is 7.5.x if it comes from PackageRepositoryController.GetDetails since that was the minimum umbraco version
// that used this endpoint!
var currentReleaseFile = content.GetPropertyValue<int>("file");
packageDetails.ZipUrl = string.Concat(BASE_URL, "/FileDownload?id=", currentReleaseFile);
}