-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (38 loc) · 1.6 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
################################################################################
# This Makefile generated by GoMakeGen 1.5.1 using next command:
# gomakegen --mod .
#
# More info: https://kaos.sh/gomakegen
################################################################################
export GO111MODULE=on
.DEFAULT_GOAL := help
.PHONY = fmt vet all clean deps mod-init mod-update mod-vendor help
################################################################################
all: source-index ## Build all binaries
source-index: ## Build source-index binary
go build source-index.go
install: ## Install all binaries
cp source-index /usr/bin/source-index
uninstall: ## Uninstall all binaries
rm -f /usr/bin/source-index
deps: mod-update ## Download dependencies
mod-init: ## Initialize new module
go mod init
go mod tidy
mod-update: ## Download modules to local cache
go mod download
mod-vendor: ## Make vendored copy of dependencies
go mod vendor
fmt: ## Format source code with gofmt
find . -name "*.go" -exec gofmt -s -w {} \;
vet: ## Runs go vet over sources
go vet -composites=false -printfuncs=LPrintf,TLPrintf,TPrintf,log.Debug,log.Info,log.Warn,log.Error,log.Critical,log.Print ./...
clean: ## Remove generated files
rm -f source-index
help: ## Show this info
@echo -e '\n\033[1mSupported targets:\033[0m\n'
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
| awk 'BEGIN {FS = ":.*?## "}; {printf " \033[33m%-14s\033[0m %s\n", $$1, $$2}'
@echo -e ''
@echo -e '\033[90mGenerated by GoMakeGen 1.5.1\033[0m\n'
################################################################################