From 493f3281f2a28c86dfeb362567e0e0bd7b602083 Mon Sep 17 00:00:00 2001 From: inosato Date: Sat, 1 May 2021 12:42:24 +0900 Subject: [PATCH] Remove setting GO111MODULE=on --- .goreleaser.yml | 2 -- Makefile | 4 ++-- build/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 7a34bdc9..16ee277d 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,5 +1,3 @@ -env: - - GO111MODULE=on before: hooks: - make clean diff --git a/Makefile b/Makefile index 16af9e5f..c4653ef5 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ export DOCKER_BUILDKIT = 1 .PHONY: nginx-prometheus-exporter nginx-prometheus-exporter: - GO111MODULE=on CGO_ENABLED=0 go build -trimpath -ldflags "-s -w -X main.version=$(VERSION) -X main.commit=$(GIT_COMMIT) -X main.date=$(DATE)" -o nginx-prometheus-exporter + CGO_ENABLED=0 go build -trimpath -ldflags "-s -w -X main.version=$(VERSION) -X main.commit=$(GIT_COMMIT) -X main.date=$(DATE)" -o nginx-prometheus-exporter .PHONY: lint lint: @@ -20,7 +20,7 @@ lint: .PHONY: test test: - GO111MODULE=on go test ./... + go test ./... .PHONY: container container: diff --git a/build/Dockerfile b/build/Dockerfile index ab0fe7fe..dc54d2eb 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -12,7 +12,7 @@ RUN go mod download COPY *.go ./ COPY collector ./collector COPY client ./client -RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=$TARGETARCH go build -trimpath -a -ldflags "-s -w -X main.version=${VERSION} -X main.commit=${GIT_COMMIT} -X main.date=${DATE}" -o nginx-prometheus-exporter . +RUN CGO_ENABLED=0 GOOS=linux GOARCH=$TARGETARCH go build -trimpath -a -ldflags "-s -w -X main.version=${VERSION} -X main.commit=${GIT_COMMIT} -X main.date=${DATE}" -o nginx-prometheus-exporter . FROM scratch as intermediate