diff --git a/ProjectPlugins/CodexPlugin/ApiChecker.cs b/ProjectPlugins/CodexPlugin/ApiChecker.cs index 39fb22a..437ad22 100644 --- a/ProjectPlugins/CodexPlugin/ApiChecker.cs +++ b/ProjectPlugins/CodexPlugin/ApiChecker.cs @@ -77,7 +77,8 @@ namespace CodexPlugin private string Hash(string file) { - var fileBytes = Encoding.ASCII.GetBytes(file); + var fileBytes = Encoding.ASCII.GetBytes(file + .Replace(Environment.NewLine, "")); var sha = SHA256.Create(); var hash = sha.ComputeHash(fileBytes); return BitConverter.ToString(hash); diff --git a/ProjectPlugins/CodexPlugin/CodexContainerRecipe.cs b/ProjectPlugins/CodexPlugin/CodexContainerRecipe.cs index 9d041c6..bf5e724 100644 --- a/ProjectPlugins/CodexPlugin/CodexContainerRecipe.cs +++ b/ProjectPlugins/CodexPlugin/CodexContainerRecipe.cs @@ -9,7 +9,7 @@ namespace CodexPlugin { private readonly MarketplaceStarter marketplaceStarter = new MarketplaceStarter(); - private const string DefaultDockerImage = "codexstorage/nim-codex:sha-c219a5f-dist-tests"; + private const string DefaultDockerImage = "codexstorage/nim-codex:sha-455b95d-dist-tests"; public const string ApiPortTag = "codex_api_port"; public const string ListenPortTag = "codex_listen_port"; public const string MetricsPortTag = "codex_metrics_port"; diff --git a/ProjectPlugins/CodexPluginPrebuild/Program.cs b/ProjectPlugins/CodexPluginPrebuild/Program.cs index 5ad5e89..8f4a8ec 100644 --- a/ProjectPlugins/CodexPluginPrebuild/Program.cs +++ b/ProjectPlugins/CodexPluginPrebuild/Program.cs @@ -1,4 +1,5 @@ using System.Security.Cryptography; +using System.Text; public static class Program { @@ -30,7 +31,10 @@ public static class Program private static string CreateHash() { - var fileBytes = File.ReadAllBytes(OpenApiFile); + var file = File.ReadAllText(OpenApiFile); + var fileBytes = Encoding.ASCII.GetBytes(file + .Replace(Environment.NewLine, "")); + var sha = SHA256.Create(); var hash = sha.ComputeHash(fileBytes); return BitConverter.ToString(hash);