builds
This commit is contained in:
parent
ca079e1c47
commit
6f79be26d8
33 changed files with 554 additions and 369 deletions
|
|
@ -10,7 +10,9 @@ using NuGet.Versioning;
|
|||
|
||||
namespace isnd.Data
|
||||
{
|
||||
public class PackageVersion
|
||||
|
||||
|
||||
public class PackageVersion
|
||||
{
|
||||
[Required]
|
||||
[ForeignKey("Package")]
|
||||
|
|
@ -20,10 +22,10 @@ namespace isnd.Data
|
|||
|
||||
[Required]
|
||||
public int Major { get; set; }
|
||||
|
||||
|
||||
[Required]
|
||||
public int Minor { get; set; }
|
||||
|
||||
|
||||
[Required]
|
||||
public int Patch { get; set; }
|
||||
|
||||
|
|
@ -35,7 +37,8 @@ namespace isnd.Data
|
|||
/// </summary>
|
||||
/// <value></value>
|
||||
[StringLength(256)]
|
||||
[Required][Key]
|
||||
[Required]
|
||||
[Key]
|
||||
public string FullString { get; set; }
|
||||
public bool IsPrerelease { get; set; }
|
||||
|
||||
|
|
@ -45,7 +48,8 @@ namespace isnd.Data
|
|||
[JsonIgnore]
|
||||
public virtual Package Package { get; set; }
|
||||
|
||||
[Required][JsonIgnore]
|
||||
[Required]
|
||||
[JsonIgnore]
|
||||
[ForeignKey("LatestCommit")]
|
||||
public long CommitNId { get; set; }
|
||||
|
||||
|
|
@ -53,7 +57,7 @@ namespace isnd.Data
|
|||
|
||||
public string CommitId { get => CommitNId.ToString(); }
|
||||
|
||||
public virtual Commit LatestCommit {get; set; }
|
||||
public virtual Commit LatestCommit { get; set; }
|
||||
public string NugetLink => $"{Constants.PaquetFileEstension}/{PackageId}/{FullString}/{PackageId}-{FullString}."
|
||||
+ Constants.PaquetFileEstension;
|
||||
public string NuspecLink => $"{Constants.SpecFileEstension}/{PackageId}/{FullString}/{PackageId}-{FullString}."
|
||||
|
|
@ -62,22 +66,15 @@ namespace isnd.Data
|
|||
public string SementicVersionString { get => $"{Major}.{Minor}.{Patch}"; }
|
||||
public NuGetVersion NugetVersion { get => new NuGetVersion(FullString); }
|
||||
|
||||
public RegistrationLeaf ToLeave(string bid, string dlbase)
|
||||
public CatalogEntry ToLeave(string bid, string extUrl)
|
||||
{
|
||||
string leaveid = bid + "/" + this.PackageId + "/" + FullString + ".json";
|
||||
return new RegistrationLeaf
|
||||
return new CatalogEntry(bid + "/" + this.PackageId + "/" + FullString + ".json")
|
||||
{
|
||||
Id = leaveid,
|
||||
PackageContent = dlbase + NugetLink,
|
||||
Entry = new CatalogEntry
|
||||
{
|
||||
Id = leaveid,
|
||||
idp = PackageId,
|
||||
version = FullString,
|
||||
authors = $"{this.Package.Owner.FullName} <${Package.Owner.Email}>"
|
||||
}
|
||||
Id = PackageId,
|
||||
Version = FullString,
|
||||
authors = $"{this.Package.Owner.FullName} <${Package.Owner.Email}>",
|
||||
packageContent = extUrl + this.NugetLink
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue