Skip to content

Commit

Permalink
Remove setting GO111MODULE=on
Browse files Browse the repository at this point in the history
  • Loading branch information
inosato committed May 6, 2021
1 parent 8e98ee4 commit 493f328
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
env:
- GO111MODULE=on
before:
hooks:
- make clean
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ 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:
go run github.com/golangci/golangci-lint/cmd/golangci-lint run

.PHONY: test
test:
GO111MODULE=on go test ./...
go test ./...

.PHONY: container
container:
Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 493f328

Please sign in to comment.