summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDave Henderson <dhenderson@gmail.com>2019-10-03 23:20:12 -0400
committerDave Henderson <dhenderson@gmail.com>2019-10-04 21:28:52 -0400
commit2a263380091311c9987fbabfb7ccb2f288e58064 (patch)
tree6b895bccc7fc3814d0266de06132acd763537d66 /Makefile
parent3ecf5c37428c072b672b825fcc9493de6e1c5df7 (diff)
Moving to go modules
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 3248dd22..2692f933 100644
--- a/Makefile
+++ b/Makefile
@@ -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))