/
Makefile
40 lines (26 loc) · 1011 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
MODULE_NAME=technochat
TEST_FILES = $(shell find -L * -name '*_test.go' -not -path "vendor/*")
TEST_PACKAGES = $(dir $(addprefix $(MODULE_NAME)/,$(TEST_FILES)))
VET_FILES = $(shell find -L * -name '*.go' -not -path "vendor/*")
VET_PACKAGES = $(dir $(addprefix $(MODULE_NAME)/,$(VET_FILES)))
TARGET_BRANCH ?= master
all: technochat
install: technochat
go install ./...
technochat:
go build -mod vendor -o bin/technochat technochat
bin/golangci-lint:
@echo "getting golangci-lint for $$(uname -m)/$$(uname -s)"
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.45.2
lint: bin/golangci-lint
bin/golangci-lint run -v -c golangci.yml --new-from-rev=$(TARGET_BRANCH)
test:
go test -v $(TEST_PACKAGES)
integration-test:
# go test -v -count=1 -timeout=10s -tags='integration_tests' ./...
go test -count=1 -timeout=10s -tags='integration_tests' ./...
vet:
go vet $(VET_PACKAGES)
clean:
rm -rf bin/
.PHONY: all clean test install vet technochat lint