-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
41 lines (34 loc) · 851 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
39
40
41
SOURCES := $(shell find . -name '*.go' -type f -not -path './vendor/*' -not -path '*/mocks/*')
TEST_OPTS=-covermode=atomic -v -cover
# Linter
.PHONY: lint-prepare
lint-prepare:
@echo "Installing golangci-lint"
@go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
.PHONY: lint
lint:
@golangci-lint run \
--exclude-use-default=false \
--exclude="constant has an explicit type" \
--enable=golint \
--enable=gocyclo \
--enable=goconst \
--enable=unconvert \
./...
# Testing
.PHONY: unittest
unittest:
@go test -short $(TEST_OPTS) ./...
.PHONY: test
test:
@go test $(TEST_OPTS) ./...
# Build and Installation
.PHONY: install
install:
@go install ./...
.PHONY: uninstall
uninstall:
@echo "Removing binaries and libraries"
@go clean -i ./...
gubrak: $(SOURCES)
go build -o gubrak github.com/Bhinneka/gubrak/cmd/gubrak