File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ PREFIX = nginx/nginx-ingress
7
7
DOCKER_TEST_RUN = docker run --rm -v $(shell pwd) :/go/src/github.com/nginxinc/kubernetes-ingress -w /go/src/github.com/nginxinc/kubernetes-ingress
8
8
DOCKER_BUILD_RUN = docker run --rm -v $(shell pwd) :/go/src/github.com/nginxinc/kubernetes-ingress -w /go/src/github.com/nginxinc/kubernetes-ingress/cmd/nginx-ingress/
9
9
GOLANG_CONTAINER = golang:1.13
10
+ GOFLAGS ?= -mod=vendor
10
11
DOCKERFILEPATH = build
11
12
DOCKERFILE = Dockerfile # note, this can be overwritten e.g. can be DOCKERFILE=DockerFileForPlus
12
13
@@ -19,19 +20,19 @@ GIT_COMMIT=$(shell git rev-parse --short HEAD)
19
20
20
21
nginx-ingress :
21
22
ifeq ($(BUILD_IN_CONTAINER ) ,1)
22
- $(DOCKER_BUILD_RUN) -e CGO_ENABLED=0 -e GO111MODULE=on -e GOFLAGS='-mod=vendor ' $(GOLANG_CONTAINER) go build -installsuffix cgo -ldflags "-w -X main.version=${VERSION} -X main.gitCommit=${GIT_COMMIT}" -o /go/src/github.com/nginxinc/kubernetes-ingress/nginx-ingress
23
+ $(DOCKER_BUILD_RUN) -e CGO_ENABLED=0 -e GO111MODULE=on -e GOFLAGS='$(GOFLAGS) ' $(GOLANG_CONTAINER) go build -installsuffix cgo -ldflags "-w -X main.version=${VERSION} -X main.gitCommit=${GIT_COMMIT}" -o /go/src/github.com/nginxinc/kubernetes-ingress/nginx-ingress
23
24
else
24
- CGO_ENABLED=0 GO111MODULE=on GOFLAGS='-mod=vendor ' GOOS=linux go build -installsuffix cgo -ldflags "-w -X main.version=${VERSION} -X main.gitCommit=${GIT_COMMIT}" -o nginx-ingress github.com/nginxinc/kubernetes-ingress/cmd/nginx-ingress
25
+ CGO_ENABLED=0 GO111MODULE=on GOFLAGS='$(GOFLAGS) ' GOOS=linux go build -installsuffix cgo -ldflags "-w -X main.version=${VERSION} -X main.gitCommit=${GIT_COMMIT}" -o nginx-ingress github.com/nginxinc/kubernetes-ingress/cmd/nginx-ingress
25
26
endif
26
27
27
28
lint :
28
29
golangci-lint run
29
30
30
31
test :
31
32
ifeq ($(BUILD_IN_CONTAINER ) ,1)
32
- $(DOCKER_TEST_RUN) -e GO111MODULE=on -e GOFLAGS='-mod=vendor ' $(GOLANG_CONTAINER) go test ./...
33
+ $(DOCKER_TEST_RUN) -e GO111MODULE=on -e GOFLAGS='$(GOFLAGS) ' $(GOLANG_CONTAINER) go test ./...
33
34
else
34
- GO111MODULE=on GOFLAGS='-mod=vendor ' go test ./...
35
+ GO111MODULE=on GOFLAGS='$(GOFLAGS) ' go test ./...
35
36
endif
36
37
37
38
verify-codegen :
You can’t perform that action at this time.
0 commit comments