Force rebuild of openapi client code each CodexPlugin build.

This commit is contained in:
benbierens
2024-04-01 10:04:32 +02:00
parent b40215dd36
commit 0263cc4eff
@@ -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 = "<INSERT-OPENAPI-YAML-HASH>";
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.