Skip to content

Commit

Permalink
chore: drop hash from manifest.json
Browse files Browse the repository at this point in the history
  • Loading branch information
yufeih committed Apr 4, 2023
1 parent d1ca45b commit 9d0cecc
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 393 deletions.
20 changes: 0 additions & 20 deletions src/Microsoft.DocAsCode.Build.Engine/HashStreamHelper.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,8 @@ private static string ExportModel(object model, string modelFileRelativePath, Ex

private void TransformDocument(string result, string extension, IDocumentBuildContext context, string destFilePath, ManifestItem manifestItem, out List<XRefDetails> unresolvedXRefs)
{
Task<byte[]> hashTask;
unresolvedXRefs = new List<XRefDetails>();
using (var stream = EnvironmentContext.FileAbstractLayer.Create(destFilePath).WithSha256Hash(out hashTask))
using (var stream = EnvironmentContext.FileAbstractLayer.Create(destFilePath))
{
using var sw = new StreamWriter(stream);
if (extension.Equals(".html", StringComparison.OrdinalIgnoreCase))
Expand All @@ -292,7 +291,6 @@ private void TransformDocument(string result, string extension, IDocumentBuildCo
{
RelativePath = destFilePath,
LinkToPath = GetLinkToPath(destFilePath),
Hash = Convert.ToBase64String(hashTask.Result)
};
manifestItem.OutputFiles.Add(extension, ofi);
}
Expand Down
105 changes: 0 additions & 105 deletions src/Microsoft.DocAsCode.Common/CircularBuffer.cs

This file was deleted.

147 changes: 0 additions & 147 deletions src/Microsoft.DocAsCode.Common/CircularStream.cs

This file was deleted.

1 change: 0 additions & 1 deletion src/Microsoft.DocAsCode.HtmlToPdf/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ public static class BuildManifestItem

public const string OutputRelativePath = "relative_path";
public const string OutputLinkToPath = "link_to_path";
public const string OutputHash = "hash";
public const string IsRawPage = "is_raw_page";

public const string SkipPublish = "skip_publish";
Expand Down
3 changes: 0 additions & 3 deletions src/Microsoft.DocAsCode.HtmlToPdf/FileOutput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ public class FileOutput
[JsonProperty(ManifestConstants.BuildManifestItem.OutputLinkToPath)]
public string LinkToPath { get; set; }

[JsonProperty(ManifestConstants.BuildManifestItem.OutputHash)]
public string Hash { get; set; }

[JsonProperty(ManifestConstants.BuildManifestItem.IsRawPage)]
public bool IsRawPage { get; set; }

Expand Down
12 changes: 0 additions & 12 deletions src/Microsoft.DocAsCode.Plugins/OutputFileInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,6 @@ public string LinkToPath
}
}

[JsonProperty("hash")]
public string Hash
{
get { return _hash; }
set
{
var o = _hash;
_hash = value;
OnPropertyChanged(nameof(Hash), o, value);
}
}

[JsonExtensionData]
public Dictionary<string, object> Metadata { get; set; } = new Dictionary<string, object>();

Expand Down
Loading

0 comments on commit 9d0cecc

Please sign in to comment.