diff options
| author | Dave Henderson <dhenderson@gmail.com> | 2019-10-03 23:20:12 -0400 |
|---|---|---|
| committer | Dave Henderson <dhenderson@gmail.com> | 2019-10-04 21:28:52 -0400 |
| commit | 2a263380091311c9987fbabfb7ccb2f288e58064 (patch) | |
| tree | 6b895bccc7fc3814d0266de06132acd763537d66 /Makefile | |
| parent | 3ecf5c37428c072b672b825fcc9493de6e1c5df7 (diff) | |
Moving to go modules
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -3,6 +3,7 @@ extension = $(patsubst windows,.exe,$(filter windows,$(1))) GO := go PKG_NAME := gomplate PREFIX := . +GOFLAGS := -mod=vendor ifeq ("$(CI)","true") LINT_PROCS ?= 1 @@ -67,6 +68,7 @@ docker-images: gomplate.iid gomplate-slim.iid $(PREFIX)/bin/$(PKG_NAME)_%: $(shell find $(PREFIX) -type f -name "*.go") GOOS=$(shell echo $* | cut -f1 -d-) GOARCH=$(shell echo $* | cut -f2 -d- | cut -f1 -d.) CGO_ENABLED=0 \ + GOFLAGS=$(GOFLAGS) \ $(GO) build \ -ldflags "-w -s $(COMMIT_FLAG) $(VERSION_FLAG)" \ -o $@ \ @@ -79,14 +81,14 @@ build: $(PREFIX)/bin/$(PKG_NAME)$(call extension,$(GOOS)) ifeq ($(OS),Windows_NT) test: - $(GO) test -v -coverprofile=c.out ./... + @GOFLAGS=$(GOFLAGS) $(GO) test -v -coverprofile=c.out ./... else test: - $(GO) test -v -race -coverprofile=c.out ./... + @GOFLAGS=$(GOFLAGS) $(GO) test -v -race -coverprofile=c.out ./... endif integration: build - $(GO) test -v -tags=integration \ + @GOFLAGS=$(GOFLAGS) $(GO) test -v -tags=integration \ ./tests/integration -check.v integration.iid: Dockerfile.integration $(PREFIX)/bin/$(PKG_NAME)_linux-amd64$(call extension,$(GOOS)) |
