-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (43 loc) · 1.24 KB
/
Copy pathMakefile
File metadata and controls
51 lines (43 loc) · 1.24 KB
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
42
43
44
45
46
47
48
49
50
51
export GO111MODULE := on
export GOSUMDB := off
# Go 1.13 defaults to TLS 1.3 and requires an opt-out. Opting out for now until certs can be regenerated before 1.14
# https://golang.org/doc/go1.12#tls_1_3
export GODEBUG := tls13=0
export GOPRIVATE=sum.golang.org/*
# SUBDIRS := \
# kafka \
# nats \
# natstream \
# pg \
# redis \
# wrappers/concurrency \
# wrappers/once/bigcache \
# wrappers/once/redis
.PHONY: generate-code
generate-code: ## Generate mocks for the project
@echo "Generate mocks for the project"
@go generate ./...
.PHONY: lint
lint:
golangci-lint run -v ./...
.PHONY: test
test: ## Run package test
go test -race ./...
# @$(foreach PKG,${SUBDIRS}, \
# pushd ${PKG} > /dev/null && set -e && go test -race ./... && popd > /dev/null ; \
# )
.PHONY: tidy
tidy: ## Run mod tidy
@echo "Run mod tidy"
go mod tidy
# @$(foreach PKG,${SUBDIRS}, \
# echo "Run mod tidy in ${PKG}" ; \
# pushd ${PKG} > /dev/null && set -e && go mod tidy && popd > /dev/null ; \
# )
.PHONY: godepup
godepup: ## Update current dependencies to the last version
go get -u -v
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' Makefile | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.DEFAULT_GOAL := help