Skip to content
This repository was archived by the owner on Jan 23, 2024. It is now read-only.

Commit 9318038

Browse files
axwmergify-bot
authored andcommitted
docker/opbeans/go: strip vN from replacement path (#1401)
When replacing go.elastic.co/apm modules for opbeans-go, strip the trailing /vN (e.g. /v2) from the module paths to form the directory structure. The version suffix is only present in module files, not in the directory structure. (cherry picked from commit ed30b62)
1 parent 324ec72 commit 9318038

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docker/opbeans/go/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RUN (cd /src/go.elastic.co/apm \
2121
&& git fetch -q origin '+refs/pull/*:refs/remotes/origin/pr/*' \
2222
&& git checkout ${GO_AGENT_BRANCH})
2323
# Add "replace" stanzas to go.mod to use the local agent repo
24-
RUN go list -m all | grep apm | cut -d' ' -f1 | xargs -i go mod edit -replace {}=/src/{}
24+
RUN go list -m all | grep apm | cut -d' ' -f1 | sed -e 's_\(.*\)/v[0-9]\+$_\1_' | xargs -i go mod edit -replace {}=/src/{}
2525
RUN go build
2626

2727
# Stage 1: copy static assets from opbeans/opbeans-frontend and

0 commit comments

Comments
 (0)