Skip to content

Commit

Permalink
fix:(makefile) disable the Go modules when installing various tools i…
Browse files Browse the repository at this point in the history
…n the Makefile
  • Loading branch information
ccojocar committed Oct 22, 2018
1 parent 0801076 commit bb04800
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 19 deletions.
15 changes: 8 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
SHELL := /bin/bash
NAME := jx
GO := GO111MODULE=on GO15VENDOREXPERIMENT=1 go
GO_NOMOD :=GO111MODULE=off go
REV := $(shell git rev-parse --short HEAD 2> /dev/null || echo 'unknown')
#ROOT_PACKAGE := $(shell $(GO) list .)
ROOT_PACKAGE := github.com/jenkins-x/jx
Expand Down Expand Up @@ -56,8 +57,8 @@ build: $(GO_DEPENDENCIES) version
CGO_ENABLED=$(CGO_ENABLED) $(GO) build $(BUILDFLAGS) -o build/$(NAME) cmd/jx/jx.go

get-test-deps:
@$(GO) get github.com/axw/gocov/gocov
@$(GO) get -u gopkg.in/matm/v1/gocov-html
$(GO_NOMOD) get github.com/axw/gocov/gocov
$(GO_NOMOD) get -u gopkg.in/matm/v1/gocov-html

test:
@CGO_ENABLED=$(CGO_ENABLED) $(GO) test -count=1 -coverprofile=cover.out -failfast -short -parallel 12 ./...
Expand Down Expand Up @@ -248,7 +249,7 @@ docker-dev-all: build linux docker-pull docker-build-and-push

# Generate go code using generate directives in files. Mocks etc...
generate:
$(GO) get github.com/petergtz/pegomock/...
$(GO_NOMOD) get github.com/petergtz/pegomock/...
$(GO) generate ./...

.PHONY: release clean arm
Expand All @@ -263,14 +264,14 @@ preview:

FGT := $(GOPATH)/bin/fgt
$(FGT):
go get github.com/GeertJohan/fgt
$(GO_NOMOD) get github.com/GeertJohan/fgt


LINTFLAGS:=-min_confidence 1.1

GOLINT := $(GOPATH)/bin/golint
$(GOLINT):
go get github.com/golang/lint/golint
$(GO_NOMOD) get github.com/golang/lint/golint

# @echo "FORMATTING"
# @$(FGT) gofmt -l=true $(GOPATH)/src/$@/*.go
Expand Down Expand Up @@ -298,12 +299,12 @@ vet: tools.govet
tools.govet:
@go tool vet 2>/dev/null ; if [ $$? -eq 3 ]; then \
echo "--> installing govet"; \
go get golang.org/x/tools/cmd/vet; \
$(GO_NOMOD) get golang.org/x/tools/cmd/vet; \
fi

GOSEC := $(GOPATH)/bin/gosec
$(GOSEC):
go get github.com/securego/gosec/cmd/gosec/...
$(GO_NOMOD) get github.com/securego/gosec/cmd/gosec/...

.PHONY: sec
sec: $(GOSEC)
Expand Down
20 changes: 10 additions & 10 deletions pkg/jx/cmd/mocks/factory.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions pkg/jx/cmd/mocks/matchers/ptr_to_dynamic_apihelper.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/jx/cmd/mocks/matchers/versioned0_interface.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/jx/cmd/mocks/matchers/versioned_interface.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bb04800

Please sign in to comment.