forked from RealSelf/git-gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
26 lines (18 loc) · 775 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
.PONY: all build deps image lint test
CHECK_FILES?=$$(go list ./... | grep -v /vendor/)
help: ## Show this help.
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
all: lint vet test build ## Run the tests and build the binary.
build: ## Build the binary.
go build -ldflags "-X github.com/netlify/git-gateway/cmd.Version=`git rev-parse HEAD`"
deps: ## Install dependencies.
@go get -u github.com/golang/lint/golint
@go get -u github.com/Masterminds/glide && glide install
image: ## Build the Docker image.
docker build .
lint: ## Lint the code
golint $(CHECK_FILES)
vet: # Vet the code
go vet $(CHECK_FILES)
test: ## Run tests.
go test -v $(CHECK_FILES)