Skip to content

Commit 011153d

Browse files
committed
Regenerate Makefile with the latest version of gomakegen
1 parent 9754343 commit 011153d

File tree

1 file changed

+39
-25
lines changed

1 file changed

+39
-25
lines changed

Makefile

+39-25
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,40 @@
11
################################################################################
22

3-
# This Makefile generated by GoMakeGen 2.3.0 using next command:
3+
# This Makefile generated by GoMakeGen 3.0.2 using next command:
44
# gomakegen --mod .
55
#
66
# More info: https://kaos.sh/gomakegen
77

88
################################################################################
99

10-
export GO111MODULE=on
11-
1210
ifdef VERBOSE ## Print verbose information (Flag)
1311
VERBOSE_FLAG = -v
1412
endif
1513

16-
COMPAT ?= 1.18
14+
COMPAT ?= 1.19
1715
MAKEDIR = $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
1816
GITREV ?= $(shell test -s $(MAKEDIR)/.git && git rev-parse --short HEAD)
1917

2018
################################################################################
2119

2220
.DEFAULT_GOAL := help
23-
.PHONY = fmt vet all clean deps update init vendor mod-init mod-update mod-download mod-vendor help
21+
.PHONY = fmt vet all install uninstall clean deps update init vendor mod-init mod-update mod-download mod-vendor help
2422

2523
################################################################################
2624

2725
all: jira-reindex-runner ## Build all binaries
2826

2927
jira-reindex-runner:
30-
go build $(VERBOSE_FLAG) -ldflags="-X main.gitrev=$(GITREV)" jira-reindex-runner.go
28+
@echo "Building jira-reindex-runner…"
29+
@go build $(VERBOSE_FLAG) -ldflags="-X main.gitrev=$(GITREV)" jira-reindex-runner.go
3130

3231
install: ## Install all binaries
33-
cp jira-reindex-runner /usr/bin/jira-reindex-runner
32+
@echo "Installing binaries…"
33+
@cp jira-reindex-runner /usr/bin/jira-reindex-runner
3434

3535
uninstall: ## Uninstall all binaries
36-
rm -f /usr/bin/jira-reindex-runner
36+
@echo "Removing installed binaries…"
37+
@rm -f /usr/bin/jira-reindex-runner
3738

3839
init: mod-init ## Initialize new module
3940

@@ -44,57 +45,70 @@ update: mod-update ## Update dependencies to the latest versions
4445
vendor: mod-vendor ## Make vendored copy of dependencies
4546

4647
mod-init:
48+
@echo "[1/2] Modules initialization…"
4749
ifdef MODULE_PATH ## Module path for initialization (String)
48-
go mod init $(MODULE_PATH)
50+
@go mod init $(MODULE_PATH)
4951
else
50-
go mod init
52+
@go mod init
5153
endif
5254

55+
@echo "[2/2] Dependencies cleanup…"
5356
ifdef COMPAT ## Compatible Go version (String)
54-
go mod tidy $(VERBOSE_FLAG) -compat=$(COMPAT) -go=$(COMPAT)
57+
@go mod tidy $(VERBOSE_FLAG) -compat=$(COMPAT) -go=$(COMPAT)
5558
else
56-
go mod tidy $(VERBOSE_FLAG)
59+
@go mod tidy $(VERBOSE_FLAG)
5760
endif
5861

5962
mod-update:
63+
@echo "[1/4] Updating dependencies…"
6064
ifdef UPDATE_ALL ## Update all dependencies (Flag)
61-
go get -u $(VERBOSE_FLAG) all
65+
@go get -u $(VERBOSE_FLAG) all
6266
else
63-
go get -u $(VERBOSE_FLAG) ./...
67+
@go get -u $(VERBOSE_FLAG) ./...
6468
endif
6569

70+
@echo "[2/4] Stripping toolchain info…"
71+
@grep -q 'toolchain ' go.mod && go mod edit -toolchain=none || :
72+
73+
@echo "[3/4] Dependencies cleanup…"
6674
ifdef COMPAT
67-
go mod tidy $(VERBOSE_FLAG) -compat=$(COMPAT)
75+
@go mod tidy $(VERBOSE_FLAG) -compat=$(COMPAT)
6876
else
69-
go mod tidy $(VERBOSE_FLAG)
77+
@go mod tidy $(VERBOSE_FLAG)
7078
endif
7179

72-
test -d vendor && rm -rf vendor && go mod vendor $(VERBOSE_FLAG) || :
80+
@echo "[4/4] Updating vendored dependencies…"
81+
@test -d vendor && rm -rf vendor && go mod vendor $(VERBOSE_FLAG) || :
7382

7483
mod-download:
75-
go mod download
84+
@echo "Downloading dependencies…"
85+
@go mod download
7686

7787
mod-vendor:
78-
rm -rf vendor && go mod vendor $(VERBOSE_FLAG)
88+
@echo "Vendoring dependencies…"
89+
@rm -rf vendor && go mod vendor $(VERBOSE_FLAG) || :
7990

8091
fmt: ## Format source code with gofmt
81-
find . -name "*.go" -exec gofmt -s -w {} \;
92+
@echo "Formatting sources…"
93+
@find . -name "*.go" -exec gofmt -s -w {} \;
8294

8395
vet: ## Runs 'go vet' over sources
84-
go vet -composites=false -printfuncs=LPrintf,TLPrintf,TPrintf,log.Debug,log.Info,log.Warn,log.Error,log.Critical,log.Print ./...
96+
@echo "Running 'go vet' over sources…"
97+
@go vet -composites=false -printfuncs=LPrintf,TLPrintf,TPrintf,log.Debug,log.Info,log.Warn,log.Error,log.Critical,log.Print ./...
8598

8699
clean: ## Remove generated files
87-
rm -f jira-reindex-runner
100+
@echo "Removing built binaries…"
101+
@rm -f jira-reindex-runner
88102

89103
help: ## Show this info
90104
@echo -e '\n\033[1mTargets:\033[0m\n'
91105
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
92-
| awk 'BEGIN {FS = ":.*?## "}; {printf " \033[33m%-21s\033[0m %s\n", $$1, $$2}'
106+
| awk 'BEGIN {FS = ":.*?## "}; {printf " \033[33m%-9s\033[0m %s\n", $$1, $$2}'
93107
@echo -e '\n\033[1mVariables:\033[0m\n'
94108
@grep -E '^ifdef [A-Z_]+ .*?## .*$$' $(abspath $(lastword $(MAKEFILE_LIST))) \
95109
| sed 's/ifdef //' \
96-
| awk 'BEGIN {FS = " .*?## "}; {printf " \033[32m%-14s\033[0m %s\n", $$1, $$2}'
110+
| awk 'BEGIN {FS = " .*?## "}; {printf " \033[32m%-11s\033[0m %s\n", $$1, $$2}'
97111
@echo -e ''
98-
@echo -e '\033[90mGenerated by GoMakeGen 2.3.0\033[0m\n'
112+
@echo -e '\033[90mGenerated by GoMakeGen 3.0.2\033[0m\n'
99113

100114
################################################################################

0 commit comments

Comments
 (0)