From 0263cc4efff0202d4dedeeee313310cf36c85bce Mon Sep 17 00:00:00 2001 From: benbierens Date: Mon, 1 Apr 2024 10:04:32 +0200 Subject: [PATCH] Force rebuild of openapi client code each CodexPlugin build. --- ProjectPlugins/CodexPluginPrebuild/Program.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ProjectPlugins/CodexPluginPrebuild/Program.cs b/ProjectPlugins/CodexPluginPrebuild/Program.cs index 8f4a8ec..d6d2a5a 100644 --- a/ProjectPlugins/CodexPluginPrebuild/Program.cs +++ b/ProjectPlugins/CodexPluginPrebuild/Program.cs @@ -4,6 +4,7 @@ using System.Text; public static class Program { private const string OpenApiFile = "../CodexPlugin/openapi.yaml"; + private const string ClientFile = "../CodexPlugin/obj/openapiClient.cs"; private const string Search = ""; private const string TargetFile = "ApiChecker.cs"; @@ -11,6 +12,9 @@ public static class Program { Console.WriteLine("Injecting hash of 'openapi.yaml'..."); + // Force client rebuild by deleting previous artifact. + File.Delete(ClientFile); + var hash = CreateHash(); // This hash is used to verify that the Codex docker image being used is compatible // with the openapi.yaml being used by the Codex plugin.