Files
gf/Makefile

29 lines
593 B
Makefile
Raw Normal View History

SHELL := /bin/bash
# execute "go mod tidy" on all folders that have go.mod file
.PHONY: tidy
tidy:
$(eval files=$(shell find . -name go.mod))
@set -e; \
for file in ${files}; do \
goModPath=$$(dirname $$file); \
if ! echo $$goModPath | grep -q "testdata"; then \
cd $$goModPath; \
go mod tidy; \
cd -; \
fi \
done
# execute "golangci-lint" to check code style
.PHONY: lint
lint:
golangci-lint run -c .golangci.yml
# make version to=v2.4.0
2023-04-24 11:44:19 +08:00
.PHONY: version
version:
@set -e; \
newVersion=$(to); \
2023-06-06 17:10:32 +08:00
./.set_version.sh ./ $$newVersion; \
echo "make version to=$(to) done"