GO := GO15VENDOREXPERIMENT=1 go pkgs = $(shell $(GO) list ./... | grep -v /vendor/) DOCKER_IMAGE_NAME ?= exporter DOCKER_IMAGE_TAG ?= latest all: format build test style: @echo ">> checking code style" @! gofmt -d $(shell find . -path ./vendor -prune -o -name '*.go' -print) | grep '^' test: @echo ">> running tests" @$(GO) test -short $(pkgs) format: @echo ">> formatting code" @$(GO) fmt $(pkgs) vet: @echo ">> vetting code" @$(GO) vet $(pkgs) build: @echo ">> building binaries" @$(GO) build -o exporter docker: @echo ">> building docker image" @docker build -t "$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" . .PHONY: all style format build test vet docker