GO := GO15VENDOREXPERIMENT=1 go pkgs = . DOCKER_IMAGE_NAME ?= challenge/exporter DOCKER_IMAGE_TAG ?= latest all: format build test get: @echo ">> get dependencies" @$(GO) get 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) build: @echo ">> building binaries" @$(GO) build -o exporter # do not use static binaries: # @$(GO) build -tags netgo -a -o exporter docker: @echo ">> building docker image" @docker build -t "$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" . .PHONY: all get style format build test docker