fix(romhacks): build on Alpine DCE base (apk + self-contained CLI)

The tyrrrz/discordchatexporter image is Alpine, not Debian, and ships DCE as a
self-contained executable (no dotnet on PATH). Use apk for python3 and invoke
/opt/app/DiscordChatExporter.Cli directly.
This commit is contained in:
ginnoir
2026-06-07 18:57:42 -05:00
parent ba207a0fcd
commit d9724f39e6
2 changed files with 11 additions and 10 deletions
+7 -6
View File
@@ -57,22 +57,23 @@ def slug(s):
def find_dce():
direct = "/opt/app/DiscordChatExporter.Cli.dll"
# Self-contained single-file executable in the Alpine DCE image (no `dotnet`).
direct = "/opt/app/DiscordChatExporter.Cli"
if os.path.exists(direct):
return direct
hits = glob.glob("/opt/**/DiscordChatExporter.Cli.dll", recursive=True)
hits = glob.glob("/opt/**/DiscordChatExporter.Cli", recursive=True)
return hits[0] if hits else None
def run_dce(channel_id):
dll = find_dce()
if not dll:
print("[romhacks] DiscordChatExporter.Cli.dll not found in image", file=sys.stderr)
dce = find_dce()
if not dce:
print("[romhacks] DiscordChatExporter.Cli not found in image", file=sys.stderr)
return False
out = EXPORTS / channel_id
out.mkdir(parents=True, exist_ok=True)
cmd = [
"dotnet", dll, "export",
dce, "export",
"-t", TOKEN,
"-c", channel_id,
"-f", "Json",