Regenerate Makefile with the latest version of gomakegen

main
Anton Novojilov 2 years ago
parent 5f2360d696
commit 9836fa5233

@ -1,6 +1,6 @@
################################################################################
# This Makefile generated by GoMakeGen 1.5.1 using next command:
# This Makefile generated by GoMakeGen 2.2.0 using next command:
# gomakegen --mod .
#
# More info: https://kaos.sh/gomakegen
@ -9,39 +9,84 @@
export GO111MODULE=on
ifdef VERBOSE ## Print verbose information (Flag)
VERBOSE_FLAG = -v
endif
MAKEDIR = $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
GITREV ?= $(shell test -s $(MAKEDIR)/.git && git rev-parse --short HEAD)
################################################################################
.DEFAULT_GOAL := help
.PHONY = fmt vet deps deps-test test mod-init mod-update mod-vendor help
.PHONY = fmt vet deps update test init vendor mod-init mod-update mod-download mod-vendor help
################################################################################
deps: mod-update ## Download dependencies
init: mod-init ## Initialize new module
deps: mod-download ## Download dependencies
deps-test: deps ## Download dependencies for tests
update: mod-update ## Update dependencies to the latest versions
vendor: mod-vendor ## Make vendored copy of dependencies
test: ## Run tests
go test -covermode=count .
ifdef COVERAGE_FILE ## Save coverage data into file (String)
go test $(VERBOSE_FLAG) -covermode=count -coverprofile=$(COVERAGE_FILE) .
else
go test $(VERBOSE_FLAG) -covermode=count .
endif
mod-init: ## Initialize new module
mod-init:
ifdef MODULE_PATH ## Module path for initialization (String)
go mod init $(MODULE_PATH)
else
go mod init
go mod tidy
endif
ifdef COMPAT ## Compatible Go version (String)
go mod tidy $(VERBOSE_FLAG) -compat=$(COMPAT)
else
go mod tidy $(VERBOSE_FLAG)
endif
mod-update:
ifdef UPDATE_ALL ## Update all dependencies (Flag)
go get -u $(VERBOSE_FLAG) all
else
go get -u $(VERBOSE_FLAG) ./...
endif
ifdef COMPAT
go mod tidy $(VERBOSE_FLAG) -compat=$(COMPAT)
else
go mod tidy $(VERBOSE_FLAG)
endif
test -d vendor && rm -rf vendor && go mod vendor $(VERBOSE_FLAG) || :
mod-update: ## Download modules to local cache
mod-download:
go mod download
mod-vendor: ## Make vendored copy of dependencies
go mod vendor
mod-vendor:
rm -rf vendor && go mod vendor $(VERBOSE_FLAG)
fmt: ## Format source code with gofmt
find . -name "*.go" -exec gofmt -s -w {} \;
vet: ## Runs go vet over sources
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 ./...
help: ## Show this info
@echo -e '\n\033[1mSupported targets:\033[0m\n'
@echo -e '\n\033[1mTargets:\033[0m\n'
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
| awk 'BEGIN {FS = ":.*?## "}; {printf " \033[33m%-12s\033[0m %s\n", $$1, $$2}'
| awk 'BEGIN {FS = ":.*?## "}; {printf " \033[33m%-14s\033[0m %s\n", $$1, $$2}'
@echo -e '\n\033[1mVariables:\033[0m\n'
@grep -E '^ifdef [A-Z_]+ .*?## .*$$' $(abspath $(lastword $(MAKEFILE_LIST))) \
| sed 's/ifdef //' \
| awk 'BEGIN {FS = " .*?## "}; {printf " \033[32m%-14s\033[0m %s\n", $$1, $$2}'
@echo -e ''
@echo -e '\033[90mGenerated by GoMakeGen 1.5.1\033[0m\n'
@echo -e '\033[90mGenerated by GoMakeGen 2.2.0\033[0m\n'
################################################################################

Loading…
Cancel
Save