novendor = $(shell go list ./... | grep -v vendor/ | grep -v integration_test)

all: release

# Runs all tasks that need to be done as part of a release. Think 'bb release"...
release: fmt lint test install

# Run all static checks
lint:
	go vet $(novendor)
	errcheck -blank $(novendor)
	golint $(novendor)

# Run auto-formatting
fmt:
	go fmt $(novendor)

# Run tests
.PHONY: test
test:
	go test -race -v $(novendor)

install:
	go install code.justin.tv/samus/AmazonMWSGoClient/cmd/...

glide:
	glide cc
	glide up --strip-vendor
	glide install --force --strip-vendor
	glide-vc --only-code --no-tests --use-lock-file --keep '**/*.json'