fix: include adapter packages in container builds

Co-authored-by: GPT-6 <gpt-6@openai.com>
This commit is contained in:
ZeusinaandGPT-6 Bot committed 2026-10-15 18:25:03 +03:00
1 parent e270810f33
commit 88564b340a
4 files changed
+17

No files matched your search

+13
View File
@@ -4,6 +4,19 @@ from pathlib import Path
directory = Path(__file__).resolve().parent
root = directory.parents[1]
# ponytail: guard the current literal COPY and deny-all/allowlist ignore shape;
# use a Dockerfile/ignore parser if these become general patterns or multi-module.
ignore = [line for line in (root / ".dockerignore").read_text().splitlines()
if line and not line.startswith("#")]
assert ignore[0] == "*" and all(line.startswith("!") for line in ignore[1:])
package_roots = {path.relative_to(root).parts[0] for path in root.rglob("*.go")}
for name in ("Dockerfile", "Dockerfile.target"):
builder = (root / name).read_text().split("\nFROM ", 1)[0]
before_build = builder[:builder.index("go build")]
for package in package_roots:
assert f"COPY {package}/ ./{package}/\n" in before_build, (name, package)
assert f"!{package}/" in ignore and f"!{package}/**" in ignore, package
compose = (directory / "compose.yaml").read_text()
entrypoint = (directory.parents[1] / "managed-target-entrypoint.sh").read_text()
readme = (directory / "README.md").read_text()