Skip to content

Commit 04308ad

Browse files
authored
Merge branch 'main' into david/per-15249-pdpci-route-auth-coverage-regression-guard-block-merge
2 parents bcf62a8 + e4e0361 commit 04308ad

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ RUN --mount=type=cache,target=/go/pkg/mod \
7777
then \
7878
cd /custom && \
7979
tar xzf custom_opa.tar.gz && \
80-
CGO_ENABLED=0 go build -a -ldflags="-s -w -extldflags=-static" -tags netgo -installsuffix netgo -o /opa && \
80+
# permit-opa moved its main package from the repo root to ./cmd/opa
81+
# (cmd/ + pkg/ layout); build whichever location the tarball provides
82+
if [ -d cmd/opa ]; then main_pkg=./cmd/opa; else main_pkg=.; fi && \
83+
CGO_ENABLED=0 go build -a -ldflags="-s -w -extldflags=-static" -tags netgo -installsuffix netgo -o /opa $main_pkg && \
8184
rm -rf /custom; \
8285
else \
8386
case $(uname -m) in \

0 commit comments

Comments
 (0)