Skip to content

Commit 96a852e

Browse files
AlexgodorojaAlex Godoroja
andauthored
e2e-managed: extract THIS host's platform bundle (#25)
The build now emits one bundle per platform; e2e-managed runs the adapter binary directly, so picking an arbitrary tarball (find ... | head -1) could grab a cross-platform binary and exec-format-error on the runner. Select *-$(go env GOOS)-$(go env GOARCH).tar.gz, falling back to any tarball for old single-platform builds. Fixes the e2e-managed failure on #24. Co-authored-by: Alex Godoroja <alex@vulturelabs.io>
1 parent b0c8a19 commit 96a852e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

scripts/e2e-managed.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,12 @@ grep -q '"id": "io.pilot.partner"' "$WORK/apps.json" \
8484
grep -q '"quota": 1' "$WORK/apps.json" && pass "publish-time rate limit recorded (quota 1)" || fail "quota not registered"
8585

8686
# ── 3. extract the REAL built adapter from the approved bundle ───────────────
87-
bundle=$(find "$WORK/store" -name '*.tar.gz' | head -1)
87+
# The build now emits one bundle per platform; this test runs the binary
88+
# directly, so pick THIS host's tarball (else exec-format-errors on a
89+
# cross-platform binary). Fall back to any tarball for old single-platform builds.
90+
EGOOS=$(go env GOOS); EGOARCH=$(go env GOARCH)
91+
bundle=$(find "$WORK/store" -name "*-${EGOOS}-${EGOARCH}.tar.gz" | head -1)
92+
[ -n "$bundle" ] || bundle=$(find "$WORK/store" -name '*.tar.gz' | head -1)
8893
[ -n "$bundle" ] || fail "no bundle produced by the admin board"
8994
mkdir -p "$WORK/app" && tar -xzf "$bundle" -C "$WORK/app"
9095
adapter=$(find "$WORK/app" -type f -perm -u+x -name '*-app' | head -1)

0 commit comments

Comments
 (0)