Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set GO111MODULE for go and promu commands, so that they work under GOPATH. #158

Merged
merged 1 commit into from
Aug 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,23 +67,23 @@ endif

test-short:
@echo ">> running short tests"
$(GO) test -short $(GOOPTS) $(pkgs)
GO111MODULE=$(GO111MODULE) $(GO) test -short $(GOOPTS) $(pkgs)

test:
@echo ">> running all tests"
$(GO) test $(GOOPTS) $(pkgs)
GO111MODULE=$(GO111MODULE) $(GO) test $(GOOPTS) $(pkgs)

cover:
@echo ">> running all tests with coverage"
$(GO) test -coverprofile=coverage.out $(GOOPTS) $(pkgs)
GO111MODULE=$(GO111MODULE) $(GO) test -coverprofile=coverage.out $(GOOPTS) $(pkgs)

format:
@echo ">> formatting code"
$(GO) fmt $(pkgs)
GO111MODULE=$(GO111MODULE) $(GO) fmt $(pkgs)

vet:
@echo ">> vetting code"
$(GO) vet $(GOOPTS) $(pkgs)
GO111MODULE=$(GO111MODULE) $(GO) vet $(GOOPTS) $(pkgs)

staticcheck: $(STATICCHECK)
@echo ">> running staticcheck"
Expand All @@ -98,11 +98,11 @@ endif

build: promu
@echo ">> building binaries"
$(PROMU) build --prefix $(PREFIX)
GO111MODULE=$(GO111MODULE) $(PROMU) build --prefix $(PREFIX)

build-linux-amd64: promu
@echo ">> building linux amd64 binaries"
@GOOS=linux GOARCH=amd64 $(PROMU) build --prefix $(PREFIX)
GO111MODULE=$(GO111MODULE) @GOOS=linux GOARCH=amd64 $(PROMU) build --prefix $(PREFIX)

tarball: promu
@echo ">> building release tarball"
Expand Down