feat: integrate Bugtracker module, UpdateService enhancements & Token hierarchy
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
|
||||
namespace Deploymentcenter.Client.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Runtime accessibility for build metadata embedded at compile-time.
|
||||
/// </summary>
|
||||
public static class BuildInfo
|
||||
{
|
||||
public static string Version { get; set; } = "1.0.0";
|
||||
public static string GitCommit { get; set; } = "HEAD";
|
||||
public static string GitCommitShort { get; set; } = "HEAD";
|
||||
public static string BuildDateUtc { get; set; } = DateTime.UtcNow.ToString("o");
|
||||
public static string Channel { get; set; } = "prod";
|
||||
|
||||
public static string Summary => $"v{Version} ({GitCommitShort}) built on {BuildDateUtc} [{Channel}]";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Deploymentcenter.Client.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Model for per-package manifest.json stored inside package.tar.gz
|
||||
/// and beside it on the LEMP release server.
|
||||
/// </summary>
|
||||
public class PackageManifest
|
||||
{
|
||||
[JsonPropertyName("projectId")]
|
||||
public string ProjectId { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("version")]
|
||||
public string Version { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("channel")]
|
||||
public string Channel { get; set; } = "prod";
|
||||
|
||||
[JsonPropertyName("buildDate")]
|
||||
public string BuildDate { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("gitCommit")]
|
||||
public string GitCommit { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("gitCommitShort")]
|
||||
public string GitCommitShort { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("changelog")]
|
||||
public string Changelog { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("files")]
|
||||
public List<PackageFileEntry> Files { get; set; } = new List<PackageFileEntry>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// File entry item inside manifest.json for integrity checking and repair.
|
||||
/// </summary>
|
||||
public class PackageFileEntry
|
||||
{
|
||||
[JsonPropertyName("path")]
|
||||
public string Path { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("sha256")]
|
||||
public string Sha256 { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("sizeBytes")]
|
||||
public long SizeBytes { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Deploymentcenter.Client.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Model for channel-level latest.json served by LEMP / Nginx or Deploymentcenter API.
|
||||
/// </summary>
|
||||
public class ReleaseManifest
|
||||
{
|
||||
[JsonPropertyName("projectId")]
|
||||
public string ProjectId { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("channel")]
|
||||
public string Channel { get; set; } = "prod";
|
||||
|
||||
[JsonPropertyName("latest")]
|
||||
public VersionInfo? Latest { get; set; }
|
||||
|
||||
[JsonPropertyName("versions")]
|
||||
public List<VersionInfo> Versions { get; set; } = new List<VersionInfo>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Individual release version details.
|
||||
/// </summary>
|
||||
public class VersionInfo
|
||||
{
|
||||
[JsonPropertyName("version")]
|
||||
public string Version { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("buildDate")]
|
||||
public string BuildDate { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("gitCommit")]
|
||||
public string GitCommit { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("gitCommitShort")]
|
||||
public string GitCommitShort { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("packageUrl")]
|
||||
public string PackageUrl { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("sha256")]
|
||||
public string Sha256 { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("sizeBytes")]
|
||||
public long SizeBytes { get; set; }
|
||||
|
||||
[JsonPropertyName("changelog")]
|
||||
public string Changelog { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("isCritical")]
|
||||
public bool IsCritical { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user