forked from imjerrybao/apex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (30 loc) · 762 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
27
28
29
30
31
32
33
34
35
36
37
38
GO ?= go
# Provide some targets for external dep management
BIN_DIR := $(GOPATH)/bin
MOCKGEN := $(BIN_DIR)/mockgen
# Build all files.
build: $(MOCKGEN)
@echo "==> Building"
@$(GO) generate ./...
.PHONY: build
# Test all packages.
test:
@go test -cover ./...
.PHONY: test
# Release binaries to GitHub.
release:
@echo "==> Releasing"
@goreleaser -p 1 --rm-dist --config .goreleaser.yml
@echo "==> Complete"
.PHONY: release
# Clean build artifacts.
clean:
@git clean -f
.PHONY: clean
$(MOCKGEN):
@echo "==> Installing Mockgen"
@go get github.com/golang/mock/gomock
@go install github.com/golang/mock/mockgen
local:
go install -a -ldflags "-X github.com/apex/apex/cmd/apex/version.Version=development" github.com/apex/apex/cmd/apex/
.PHONY: local