Skip to content

Commit

Permalink
Fix build with go 1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesLindsay0 committed Aug 8, 2024
1 parent 4277bcb commit a1e8e68
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions features/fixtures/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ WORKDIR /app/src/github.com/bugsnag/bugsnag-go/v2
# Ensure subsequent steps are re-run if the GO_VERSION variable changes
ARG GO_VERSION

# Required for go 1.11 as modules are not enabled by default
ENV GO111MODULE="on"

# Get bugsnag dependencies using a conditional call to run go get or go install based on the go version
RUN if [[ $(echo -e "1.11\n$GO_VERSION\n1.16" | sort -V | head -2 | tail -1) == "$GO_VERSION" ]]; then \
echo "Version is between 1.11 and 1.16, running go get"; \
Expand Down
3 changes: 3 additions & 0 deletions features/fixtures/autoconfigure/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ WORKDIR /app/src/github.com/bugsnag/bugsnag-go/v2
# Ensure subsequent steps are re-run if the GO_VERSION variable changes
ARG GO_VERSION

# Required for go 1.11 as modules are not enabled by default
ENV GO111MODULE="on"

# Get bugsnag dependencies using a conditional call to run go get or go install based on the go version
RUN if [[ $(echo -e "1.11\n$GO_VERSION\n1.16" | sort -V | head -2 | tail -1) == "$GO_VERSION" ]]; then \
echo "Version is between 1.11 and 1.16, running go get"; \
Expand Down
3 changes: 3 additions & 0 deletions features/fixtures/net_http/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ WORKDIR /app/src/github.com/bugsnag/bugsnag-go/v2
# Ensure subsequent steps are re-run if the GO_VERSION variable changes
ARG GO_VERSION

# Required for go 1.11 as modules are not enabled by default
ENV GO111MODULE="on"

# Get bugsnag dependencies using a conditional call to run go get or go install based on the go version
RUN if [[ $(echo -e "1.11\n$GO_VERSION\n1.16" | sort -V | head -2 | tail -1) == "$GO_VERSION" ]]; then \
echo "Version is between 1.11 and 1.16, running go get"; \
Expand Down

0 comments on commit a1e8e68

Please sign in to comment.