Adds codex revision to metadata.

This commit is contained in:
benbierens 2023-11-13 09:37:45 +01:00
parent 344d3cd44f
commit 960bef455a
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
2 changed files with 8 additions and 1 deletions

View File

@ -19,12 +19,13 @@ namespace CodexPlugin
public void Announce() public void Announce()
{ {
tools.GetLog().Log($"Loaded with Codex ID: '{codexStarter.GetCodexId()}'"); tools.GetLog().Log($"Loaded with Codex ID: '{codexStarter.GetCodexId()}' - Revision: {codexStarter.GetCodexRevision()}");
} }
public void AddMetadata(IAddMetadata metadata) public void AddMetadata(IAddMetadata metadata)
{ {
metadata.Add("codexid", codexStarter.GetCodexId()); metadata.Add("codexid", codexStarter.GetCodexId());
metadata.Add("codexrevision", codexStarter.GetCodexRevision());
} }
public void Decommission() public void Decommission()

View File

@ -66,6 +66,12 @@ namespace CodexPlugin
return recipe.Image; return recipe.Image;
} }
public string GetCodexRevision()
{
if (versionResponse != null) return versionResponse.revision;
return "unknown";
}
private StartupConfig CreateStartupConfig(CodexSetup codexSetup) private StartupConfig CreateStartupConfig(CodexSetup codexSetup)
{ {
var startupConfig = new StartupConfig(); var startupConfig = new StartupConfig();