53 lines
1.6 KiB
C#
53 lines
1.6 KiB
C#
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; }
|
|
}
|
|
}
|