SHELL := /bin/bash
export PATH := $(CURDIR)/_tools/bin:$(PATH)

.PHONY: setup vendor fmt

setup:
	# build source files in _tools to _tools/bin
	GOPATH=$(CURDIR)/_tools go install all 

vendor:	setup
	# Correctly vendor all dependencies from glide.yaml
	glide update --strip-vendor
	glide-vc --only-code --no-tests

fmt: setup
	# Format the codebase via go fmt and goimports
	go fmt ./cmd/... ./clients/...
	goimports -w /dev/null cmd clients

