Skip to content

Commit fb2ac77

Browse files
committed
Regenerate Makefile with the latest version of gomakegen
1 parent f344681 commit fb2ac77

1 file changed

Lines changed: 55 additions & 15 deletions

File tree

Makefile

Lines changed: 55 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
################################################################################
22

3-
# This Makefile generated by GoMakeGen 1.5.1 using next command:
3+
# This Makefile generated by GoMakeGen 2.0.0 using next command:
44
# gomakegen --mod .
55
#
66
# More info: https://kaos.sh/gomakegen
@@ -9,48 +9,88 @@
99

1010
export GO111MODULE=on
1111

12+
ifdef VERBOSE ## Print verbose information (Flag)
13+
VERBOSE_FLAG = -v
14+
endif
15+
16+
################################################################################
17+
1218
.DEFAULT_GOAL := help
13-
.PHONY = fmt vet all clean deps mod-init mod-update mod-vendor help
19+
.PHONY = fmt vet all clean deps update init vendor mod-init mod-update mod-download mod-vendor help
1420

1521
################################################################################
1622

1723
all: sslcli ## Build all binaries
1824

19-
sslcli: ## Build sslcli binary
20-
go build sslcli.go
25+
sslcli:
26+
go build $(VERBOSE_FLAG) sslcli.go
2127

2228
install: ## Install all binaries
2329
cp sslcli /usr/bin/sslcli
2430

2531
uninstall: ## Uninstall all binaries
2632
rm -f /usr/bin/sslcli
2733

28-
deps: mod-update ## Download dependencies
34+
init: mod-init ## Initialize new module
2935

30-
mod-init: ## Initialize new module
31-
go mod init
32-
go mod tidy
36+
deps: mod-download ## Download dependencies
3337

34-
mod-update: ## Download modules to local cache
38+
update: mod-update ## Update dependencies to the latest versions
39+
40+
vendor: mod-vendor ## Make vendored copy of dependencies
41+
42+
mod-init:
43+
ifdef MODULE_PATH ## Module path for initialization (String)
44+
go mod init $(MODULE_PATH)
45+
else
46+
go mod init
47+
endif
48+
49+
ifdef COMPAT ## Compatible Go version (String)
50+
go mod tidy $(VERBOSE_FLAG) -compat=$(COMPAT)
51+
else
52+
go mod tidy $(VERBOSE_FLAG)
53+
endif
54+
55+
mod-update:
56+
ifdef UPDATE_ALL ## Update all dependencies (Flag)
57+
go get -u $(VERBOSE_FLAG) all
58+
else
59+
go get -u $(VERBOSE_FLAG) ./...
60+
endif
61+
62+
ifdef COMPAT
63+
go mod tidy $(VERBOSE_FLAG) -compat=$(COMPAT)
64+
else
65+
go mod tidy $(VERBOSE_FLAG)
66+
endif
67+
68+
test -d vendor && go mod vendor $(VERBOSE_FLAG) || :
69+
70+
mod-download:
3571
go mod download
3672

37-
mod-vendor: ## Make vendored copy of dependencies
38-
go mod vendor
73+
mod-vendor:
74+
go mod vendor $(VERBOSE_FLAG)
3975

4076
fmt: ## Format source code with gofmt
4177
find . -name "*.go" -exec gofmt -s -w {} \;
4278

43-
vet: ## Runs go vet over sources
79+
vet: ## Runs 'go vet' over sources
4480
go vet -composites=false -printfuncs=LPrintf,TLPrintf,TPrintf,log.Debug,log.Info,log.Warn,log.Error,log.Critical,log.Print ./...
4581

4682
clean: ## Remove generated files
4783
rm -f sslcli
4884

4985
help: ## Show this info
50-
@echo -e '\n\033[1mSupported targets:\033[0m\n'
86+
@echo -e '\n\033[1mTargets:\033[0m\n'
5187
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
52-
| awk 'BEGIN {FS = ":.*?## "}; {printf " \033[33m%-12s\033[0m %s\n", $$1, $$2}'
88+
| awk 'BEGIN {FS = ":.*?## "}; {printf " \033[33m%-14s\033[0m %s\n", $$1, $$2}'
89+
@echo -e '\n\033[1mVariables:\033[0m\n'
90+
@grep -E '^ifdef [A-Z_]+ .*?## .*$$' $(abspath $(lastword $(MAKEFILE_LIST))) \
91+
| sed 's/ifdef //' \
92+
| awk 'BEGIN {FS = " .*?## "}; {printf " \033[32m%-14s\033[0m %s\n", $$1, $$2}'
5393
@echo -e ''
54-
@echo -e '\033[90mGenerated by GoMakeGen 1.5.1\033[0m\n'
94+
@echo -e '\033[90mGenerated by GoMakeGen 2.0.0\033[0m\n'
5595

5696
################################################################################

0 commit comments

Comments
 (0)